1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

Fixed silly bug in dup2 code found by Kenichi Okuyama@Tokyo Research Lab. IBM-Japan. Co. Jp.

Jeremy.
This commit is contained in:
Jeremy Allison 0001-01-01 00:00:00 +00:00
parent 4f66eda11e
commit 9c2272e056

View File

@ -58,7 +58,7 @@ static BOOL setup_stdout_file(char *outfile,BOOL shared)
if (fd == -1) return False;
if (fd != 1) {
if (dup2(fd,1) != 0) {
if (dup2(fd,1) != 1) {
DEBUG(2,("Failed to create stdout file descriptor\n"));
close(fd);
return False;