mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 18:47:21 +08:00
do not close stdin/stdout for posix
This commit is contained in:
@@ -1272,13 +1272,16 @@ int sdlog2_thread_main(int argc, char *argv[])
|
||||
|
||||
subs.sat_info_sub = -1;
|
||||
|
||||
/* close non-needed fd's */
|
||||
#ifdef __PX4_NUTTX
|
||||
/* close non-needed fd's. We cannot do this for posix since the file
|
||||
descriptors will also be closed for the parent process
|
||||
*/
|
||||
|
||||
/* close stdin */
|
||||
close(0);
|
||||
/* close stdout */
|
||||
close(1);
|
||||
|
||||
#endif
|
||||
/* initialize thread synchronization */
|
||||
pthread_mutex_init(&logbuffer_mutex, NULL);
|
||||
pthread_cond_init(&logbuffer_cond, NULL);
|
||||
|
||||
Reference in New Issue
Block a user