X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=networking%2Fnc.c;h=1b32e3aa334893b7eba4fe937a260bf0fcc5d3d4;hb=d38ca03946000f0837e9a0e04937499509db54c4;hp=5fd8bd759b836231a062e995e4367aa11dc8763e;hpb=77cc2c5738d780b97b56af49510ed64d61ad2e2d;p=oweals%2Fbusybox.git diff --git a/networking/nc.c b/networking/nc.c index 5fd8bd759..1b32e3aa3 100644 --- a/networking/nc.c +++ b/networking/nc.c @@ -1,10 +1,10 @@ /* vi: set sw=4 ts=4: */ -/* nc: mini-netcat - built from the ground up for LRP +/* nc: mini-netcat - built from the ground up for LRP * - * Copyright (C) 1998, 1999 Charles P. Wright - * Copyright (C) 1998 Dave Cinege + * Copyright (C) 1998, 1999 Charles P. Wright + * Copyright (C) 1998 Dave Cinege * - * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. + * Licensed under GPLv2 or later, see file LICENSE in this source tree. */ #include "libbb.h" @@ -34,7 +34,7 @@ //config: //config:config NC_110_COMPAT //config: bool "Netcat 1.10 compatibility (+2.5k)" -//config: default y +//config: default n # off specially for Rob //config: depends on NC //config: help //config: This option makes nc closely follow original nc-1.10. @@ -49,7 +49,7 @@ //usage:#if !ENABLE_NC_110_COMPAT //usage: //usage:#if ENABLE_NC_SERVER || ENABLE_NC_EXTRA -//usage:#define NC_OPTIONS_STR "\n\nOptions:" +//usage:#define NC_OPTIONS_STR "\n" //usage:#else //usage:#define NC_OPTIONS_STR //usage:#endif @@ -216,10 +216,8 @@ int nc_main(int argc, char **argv) if (execparam) { pid_t pid; /* With more than one -l, repeatedly act as server */ - if (do_listen > 1 && (pid = vfork()) != 0) { - /* parent or error */ - if (pid < 0) - bb_perror_msg_and_die("vfork"); + if (do_listen > 1 && (pid = xvfork()) != 0) { + /* parent */ /* prevent zombies */ signal(SIGCHLD, SIG_IGN); close(cfd);