9 More Discussions You Might Find Interesting
1. Programming
Hi guys!
I'll simplify my problem. I have the following code:
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <signal.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/wait.h>
#define max 25
#define buffdim 50
void p1();
void p2();... (2 Replies)
Discussion started by: pfpietro
2 Replies
2. Programming
Hello people
I need help
How to make ONE process to create MORE (not one) processes with fork(). I tried several codes but do not work.
Thanks (8 Replies)
Discussion started by: nekoj
8 Replies
3. Shell Programming and Scripting
Hi,
How to count how many processes opened by fork function in perl.
Thanks (10 Replies)
Discussion started by: Anjan1
10 Replies
4. Programming
Hi friends,
I have a small question regarding unix system call fork, I hope you will solve my problem. Here is the small program
$ cat fork1.c
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
int main()
{
int pid;
int x = 0;
x = x + 1;
pid = fork();
if(pid < 0)
{... (2 Replies)
Discussion started by: gabam
2 Replies
5. UNIX for Dummies Questions & Answers
Disclaimer: This is just a rainy day experiment. There is no expected "goal" other than to understand UNIX better.
After reading about fork and exec, my understanding is that forking, as the UNIX shell does by design, consequentially may sacrafice some speed versus an approach that runs in... (1 Reply)
Discussion started by: uiop44
1 Replies
6. SCO
Dear experts,
I have done a re-installation of sco unix openserver 5.0.5 and managed to create users. The problem am facing is that of one user logging in more than 5 times. How can i overcome this problem. the system give the error below.
-sh: fork failed - too many processes in sco unix... (5 Replies)
Discussion started by: njoroge
5 Replies
7. Shell Programming and Scripting
Hello,
How many child processes are actually created when running this code ?
#include <signal.h>
#include <stdio.h>
int main () {
int i ;
setpgrp () ;
for (i = 0; i < 10; i++) {
if (fork () == 0) {
if ( i & 1 ) setpgrp () ;
printf ("Child id: %2d, group: %2d\n",... (1 Reply)
Discussion started by: green_dot
1 Replies
8. Programming
Hello,
How many child processes are actually created when running this code ?
#include <signal.h>
#include <stdio.h>
int main () {
int i ;
setpgrp () ;
for (i = 0; i < 10; i++) {
if (fork () == 0) {
if ( i & 1 ) setpgrp () ;
printf ("Child id: %2d, group: %2d\n", getpid(),... (0 Replies)
Discussion started by: green_dot
0 Replies
9. Shell Programming and Scripting
Hi,
I'm looking for a possibility to make variables of the shell public to child processes.
Usually I would try
set -a
but an error message appears:
./decrypt.pgm: -a^M: bad option(s)
where decrypt.pgm is the name of the shell script.
Any help welcome!
Cheers Martin (2 Replies)
Discussion started by: martinn
2 Replies