Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Script spawned on qnx 6.5.0 remote node (on -f) fails with "cannot fork": (4 Items)
   
Script spawned on qnx 6.5.0 remote node (on -f) fails with "cannot fork"  
hello there

QNX 6.5.0 over x86 arch boxes, connected with qnet: it seems that a very simple script spawned on a remote node (from a 
non-root shell) is unable to start any process, failing with the message:

cannot fork - try again

The same script, launched with the same "on -f" command, can be run without problems in the following cases:
- from a root shell, if system is based on qnx 6.5.0
- from a non-root shell, if system is based on qnx 6.4.1

Is there some new restriction about scripts privileges under qnx 6.5.0 ? Or how can I get back to the good old behaviour
?

Here are some commands showing infos about my system and what I get from the script execution in different cases:

user@bart /home/user$ pidin net
 ND    Node             CPU      Release FreeMem       BootTime
 0     bart             1 X86    6.5.0   2386Mb/2573Mb Jan 08 16:37:58 CET 2015
           Processes: 48, Threads: 121
           CPU 1:     131758 Intel 686 F6M12S2      2401MHz FPU 
 1     ppu10            1 X86    6.5.0   2739Mb/2929Mb Jan 08 16:38:13 CET 2015
           Processes: 21, Threads: 50
           CPU 1:     131758 Intel 686 F6M12S2      2400MHz FPU 

user@bart /home/user$ cat ./dap
sleep 1
echo done!

user@bart /home/user$ ls -la ./dap
-rwxrwxr-x  1 user      users            20 Jan 09 11:00 ./dap

user@bart /home/user$ ./dap
done!

user@bart /home/user$ on -f ppu10 ./dap
./dap[1]: cannot fork - try again

user@bart /home/user$ su  
password:
# 
# on -f ppu10 ./dap
done!

thanks in advance!
Davide
Re: Script spawned on qnx 6.5.0 remote node (on -f) fails with "cannot fork"  
No to be annoying, but... any idea about my problem? ;)

Davide
Re: Script spawned on qnx 6.5.0 remote node (on -f) fails with "cannot fork"  
I assume if you try to run a compiled binary on your remote node it 
works? What happens if you use the full network path to sh in your 
script, so like:

#!/net/bin/sh
echo "hello world"
Re: Script spawned on qnx 6.5.0 remote node (on -f) fails with "cannot fork"  
Binary spawned on remote node works as expected, even from a non-root shell:

$ on -f ppu10 printf "HELLO\n"
HELLO
$

I tried with the full network path to the shell, as you asked, but the behaviour I get is exactly the same as before.

Note that the shell interpreting the "dap" script is actually able to run on the remote node, since builtin commands 
like "echo" work fine.
It seems that the shell itself is not able to spawn other binaries :

$ cat dap
#!/net/bart/bin/sh

#sleep 1
echo done

$ cat dop
#!/net/bart/bin/sh

sleep 1
echo done

$ on -f ppu10 ./dap
done
$ 
$ on -f ppu10 ./dop 
./dop[3]: cannot fork - try again
$ 

many thanks for your help
Davide