36 lines
912 B
Plaintext
36 lines
912 B
Plaintext
$OpenBSD: patch-src_scan_c,v 1.3 2012/01/03 12:11:53 ajacoutot Exp $
|
|
--- src/scan.c.orig Tue Jan 3 10:10:16 2012
|
|
+++ src/scan.c Tue Jan 3 10:50:22 2012
|
|
@@ -71,7 +71,6 @@ scan_do (Netinfo * netinfo)
|
|
GIOChannel *channel;
|
|
GIOChannel *channel2;
|
|
gint pfd[2];
|
|
- gint pid;
|
|
gchar buf[SIZE];
|
|
gchar *service_name = NULL;
|
|
gint ip_version, pf;
|
|
@@ -130,12 +129,12 @@ scan_do (Netinfo * netinfo)
|
|
|
|
netinfo_toggle_state (netinfo, INACTIVE, NULL);
|
|
|
|
- if ((pid = fork ()) < 0) {
|
|
+ if ((childpid = fork ()) < 0) {
|
|
perror ("fork failed");
|
|
return;
|
|
}
|
|
|
|
- if (pid == 0) {
|
|
+ if (childpid == 0) {
|
|
/* child */
|
|
close (pfd[0]);
|
|
for (i = start_port; i <= end_port; i++) {
|
|
@@ -187,7 +186,7 @@ scan_do (Netinfo * netinfo)
|
|
/* parent */
|
|
close (pfd[1]);
|
|
|
|
- netinfo->child_pid = pid;
|
|
+ netinfo->child_pid = childpid;
|
|
netinfo->pipe_out = pfd[0];
|
|
|
|
channel2 = g_io_channel_unix_new (pfd[0]);
|