2010-05-14 00:27:05 +02:00
|
|
|
diff --git a/client/dhclient.c b/client/dhclient.c
|
|
|
|
index 69dcc91..15c31a5 100644
|
|
|
|
--- a/client/dhclient.c
|
|
|
|
+++ b/client/dhclient.c
|
|
|
|
@@ -3173,6 +3173,12 @@ int script_go (client)
|
2007-07-21 17:29:24 +02:00
|
|
|
*/
|
|
|
|
if (leaseFile != NULL)
|
|
|
|
fclose(leaseFile);
|
2007-01-10 17:39:58 +01:00
|
|
|
+ if ((i = open("/dev/null", O_RDWR)) != -1) {
|
|
|
|
+ dup2(i, STDIN_FILENO);
|
|
|
|
+ dup2(i, STDOUT_FILENO);
|
|
|
|
+ if (i > STDERR_FILENO)
|
|
|
|
+ close(i);
|
|
|
|
+ }
|
|
|
|
execve (scriptName, argv, envp);
|
|
|
|
log_error ("execve (%s, ...): %m", scriptName);
|
|
|
|
exit (0);
|