Nmap Development mailing list archives

Re: [PATCH/RFC] add support for systems w/out fork()


From: David Fifield <david () bamsoftware com>
Date: Mon, 20 Jul 2009 13:10:04 -0600

On Thu, Jul 16, 2009 at 06:52:10PM -0400, Mike Frysinger wrote:
Not sure how people wish to handle the -lpthread in Makefile.in.

Signed-off-by: Mike Frysinger <vapier () gentoo org>
---
 main.cc           |    3 +++
 ncat/Makefile.in  |    2 +-
 ncat/ncat_posix.c |    6 +++++-
 ncat/ncat_proxy.c |   22 +++++++++++++++++++++-
 ncat/util.c       |    8 ++++++++
 ncat/util.h       |    5 +++++
 6 files changed, 43 insertions(+), 3 deletions(-)

diff --git a/main.cc b/main.cc
index 2db1a72..c2ce38f 100644
--- a/main.cc
+++ b/main.cc
@@ -254,6 +254,9 @@ int main(int argc, char *argv[]) {
     } else if (*myargv[0] == 'd') {
       o.debugging++;
     } else if (strcasecmp(myargv[0], "f") == 0) {
+#ifndef HAVE_FORK
+# define fork() vfork()
+#endif
       switch((ret = fork())) {
       case 0: /* Child */
      /* My job is as follows:

What operating system is this that doesn't have fork?

David Fifield

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: