Re: [hackers] [sbase][PATCH] nohup: Open nohup.out WRONLY

From: Quentin Rameau <quinq_AT_fifth.space>
Date: Sun, 24 Oct 2021 00:39:33 +0200

Hi Arthur,

> Open nohup.out write-only instead of not specifying the access permissions
> instead of getting undefined behavior (which probably results in stdout
> not being writable).
>
> - if ((fd = open("nohup.out", O_APPEND | O_CREAT, S_IRUSR | S_IWUSR)) < 0)
> + if ((fd = open("nohup.out", O_WRONLY | O_APPEND | O_CREAT, S_IRUSR | S_IWUSR)) < 0)

Thanks for the patch, it's valid and Michael should merge it when he's
got time.
Received on Sun Oct 24 2021 - 00:39:33 CEST

This archive was generated by hypermail 2.3.0 : Sun Oct 24 2021 - 00:48:33 CEST