Tagged Questions
1
vote
2answers
40 views
Why does the child of an eval call from bash get orphaned once the parent bash script dies?
The behavior I describe is currently observed to happen on OS X.
Bash script parent-script.sh contains a command eval $SCRIPT where SCRIPT is a string such as ./another-script.sh.
If ...
0
votes
1answer
22 views
When are PID released?
As far as I know (pardon my ignorance on the subject), when a process fork()s:
Each child gets assigned its own PID
After a child has exited, the parent is still able to query the child's PID with ...
0
votes
2answers
41 views
How to get PID of process by specifying process name and store it in a variable to use further?
By using "ucbps" command i am able to get all PIDs
$ ucbps
Userid PID CPU % Mem % FD Used Server Port
...
0
votes
0answers
43 views
Heap size of unix process (vmdata vs pmap)
What is the difference between the value reported in VmData in /proc and the heap reported in the pmap command for a unix process?
Is there any correlation between the two values regarding the heap ...
0
votes
1answer
42 views
process state in Unix
I need to understand what happens to a process in Unix when it calls the pause() function.
Considering a simple state diagram with three states: ready, run and wait. If my programm only prints its ...
0
votes
0answers
56 views
C: parallel processes and pick the last but one
I have to write a program in C that uses processes, not threads (I'm writing in UNIX):
the father generate 7 children.
every child generate a random integer and begin an empty for statement from 0 to ...
0
votes
1answer
90 views
Java - “bash”: java.io.IOException: error=7, Argument list too long
I have a requirement to call Unix command from Java
The code is as follows
String strCmd = "iconv -f "+ strSrcEncoding+" -t "+ strTgtEncoding + " <<< "+"\""+InputMessage+"\"";
...
4
votes
1answer
94 views
Is there any way to get very precise information (number of used bytes, number of CPU instructions) about process in Unix?
Here is the problem: there is a set of programs written in different languages (mostly Perl and Python). Every program x reads lines from stdin, does some work (parses line, updates data structes, no ...
0
votes
1answer
44 views
Creating multiple child processes with a single pipe
I need to create three child processes, each of which reads a string from the command line arguments and writes the string to a single pipe. The parent would then read the strings from the pipe and ...
0
votes
1answer
65 views
Wait until 2 pid write to FIFO(named pipe)
Im trying to make a Tic Tac Toe game with server-client using FIFO(named pipe) and shared memory.
The first step is to write the pid of the client process to the FIFO.
And in the server process i ...
0
votes
3answers
105 views
Pass a string with spaces to an execute command in Java to execute a bash script
How do I pass a string with spaces to an execute command in Java to execute a bash script?
I'm trying to use a script to generate and send a email using the unix mail command but it ignores the ...
0
votes
3answers
53 views
replace infinity loop without new thread
for(;;)
{
...// CPU usage and etc...
printf("Server is up: %.0f sec\n",diff_time); //seconds of running for example
sleep(1);
}
...//other server code
I'm writing ...
0
votes
3answers
60 views
Why is a zombie process necessary?
Wikipedia basically gives all the possible information about zombie processes that I NEED to know but just a simple line on how it might be useful..in that a conflict in PIDs will not exist in the ...
-2
votes
1answer
93 views
global variable in parent and children processes
Question about processes dynamic pool. I need to keep information of free processes. If count of free processes will be less than N, I should create new processes. But,I know that free variable will ...
0
votes
1answer
73 views
Using pipes to read to read and write.The program compiles but no output.Why?
I'm trying use pipes to write a string using write() from inside the parent process.And then spawn a child process wherein i read it,count the number of words and write the word count back.Then have ...