Subject: fork() fails for network-mounted executables
From: [email-masked] (Shankar Unni)

24 Jan 1997 02:41:26 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.0Gold (X11; I; SunOS 5.5.1 sun4u)
Original-To: [email-masked]
Original-CC: [email-masked]
Original-Sender: [email-masked]

Geoffrey, consider this a bug report, which is why I'm also directly
cc'ing you. 

On Windows 95, if an executable calling fork() lives in a
network-mounted directory, the fork() fails with errno = 13 (EACCES -
Permission denied).

Here's a simple example. If you put this executable on a network-mounted
drive, it will fail. If it is on a local drive, it will succeed:

    #include <errno.h>
 
    main(int argc, char **argv)
    {
        int pid;
 
        printf("In %d\n", getpid());
        if (argc == 1) {
            if ((pid = fork()) == 0) {
                /* child */
                execl(argv[0], argv[0], "dummy", 0);
                printf("execl of %s failed\n", argv[0]);
            } else if (pid == -1) {
                printf("fork failed - errno = %d\n", errno);
            } else {
                int *x;
                printf("In parent of %d\n", pid);
                wait(&x);
            }
        }
    }

Is there any workaround for this at all? I've been unable to find any
(even specifying the full path fails).

Thanks,
-- 
Shankar Unni                                  [email-masked]
Chromatic Research                            (408) 752-9488
-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".