Skip to content
Snippets Groups Projects
Commit c9f68e79 authored by Ludwig Knüpfer's avatar Ludwig Knüpfer
Browse files

native: set _native_pid correctly in daemon mode

This fixes a bug that leads to all unix sockets being created as
`/tmp/riot.tty.0`.
parent 05a3570f
No related branches found
No related tags found
No related merge requests found
...@@ -146,6 +146,9 @@ void daemonize(void) ...@@ -146,6 +146,9 @@ void daemonize(void)
real_printf("RIOT pid: %d\n", _native_pid); real_printf("RIOT pid: %d\n", _native_pid);
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
} }
else {
_native_pid = real_getpid();
}
} }
void usage_exit(void) void usage_exit(void)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment