/* 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"
//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.
//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
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);