mirror of
https://github.com/samba-team/samba.git
synced 2025-03-05 20:58:40 +03:00
Fix for PR#9497 - not waiting for child.
Jeremy. (This used to be commit e817d836bba3aaf0f732d66bc5a4383a7f7005db)
This commit is contained in:
parent
148691b1c5
commit
0067ea1b5a
@ -319,12 +319,14 @@ BOOL chat_with_program(char *passwordprogram,char *name,char *chatsequence, BOOL
|
||||
kill(pid, SIGKILL); /* be sure to end this process */
|
||||
}
|
||||
|
||||
close(master);
|
||||
|
||||
if ((wpid = sys_waitpid(pid, &wstat, 0)) < 0) {
|
||||
DEBUG(3,("The process is no longer waiting!\n\n"));
|
||||
close(master);
|
||||
return(False);
|
||||
}
|
||||
|
||||
close(master);
|
||||
|
||||
if (pid != wpid) {
|
||||
DEBUG(3,("We were waiting for the wrong process ID\n"));
|
||||
return(False);
|
||||
|
Loading…
x
Reference in New Issue
Block a user