Revision 4d54ec78 slirp/misc.c

b/slirp/misc.c
119 119
	char *bptr;
120 120
	const char *curarg;
121 121
	int c, i, ret;
122
	pid_t pid;
122 123

  
123 124
	DEBUG_CALL("fork_exec");
124 125
	DEBUG_ARG("so = %lx", (long)so);
......
142 143
		}
143 144
	}
144 145

  
145
	switch(fork()) {
146
	pid = fork();
147
	switch(pid) {
146 148
	 case -1:
147 149
		lprint("Error: fork failed: %s\n", strerror(errno));
148 150
		close(s);
......
206 208
		exit(1);
207 209

  
208 210
	 default:
211
		qemu_add_child_watch(pid);
209 212
		if (do_pty == 2) {
210 213
			close(s);
211 214
			so->s = master;

Also available in: Unified diff