[LTP] [PATCH] netstress: set port dynamically on the server-side

Alexey Kodanev alexey.kodanev@oracle.com
Thu Mar 1 16:28:35 CET 2018


On 02/27/2018 10:09 AM, Petr Vorel wrote:
... 
>> +static void move_to_background(void)
>> +{
>> +	if (SAFE_FORK())
>> +		exit(0);
>> +
>> +	SAFE_SETSID();
>> +
>> +	close(0);
>> +	SAFE_OPEN("/dev/null", O_RDONLY);
>> +
>> +	close(1);
>> +	close(2);
> Minor nit: maybe using STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO is "correct way", but everyone
> knows these numbers.

Corrected and applied the patch.

Thanks,
Alexey


More information about the ltp mailing list