Re:Getting a network trace from a single application
by jakobdabo on Tuesday July 19, 2016 @05:46PM
(#12125188)
While we are doing this...
#define APP_TIMEOUT (2000000L) /* 2 seconds */
...
usleep(APP_TIMEOUT);
usleep limits its argument's range to values from 0 to 1000000 and is considered obsolete. Please use nanosleep instead.
Re:Getting a network trace from a single application
by jonasdn on Wednesday July 20, 2016 @02:07AM
(#12127178)
Thank you, applied :)
Re:Getting a network trace from a single application
by heinrich5991 on Tuesday July 19, 2016 @12:36PM
(#12122728)
Looks like a '\n' is missing there.
One thing: the "Handle exceptions of setuid() and setgid()" commit message caught my eye, so I took a look:
You probably want to add an exit() here, as well as to the preceeding setgid() call. Also, the earlier initgroups() can fail, too, so its result should also be checked.