I am trying to ping through a list of devices in parallel.
When the code below is executed, I enter a infinite loop.
I want to used the number of lines in the file as my boundry.
I am a perl rookie and just cant see whats wrong.
would appreciate help ...
I need a quick script that will serve as a sort of "real time monitor" for watching some log files. I am using Bourne shell in HP-UX 10.20. I have basically created a script that never ends, unless of course I manually terminate it. Here's the script (it's called qhistory):
clear
echo "REAL... (3 Replies)
I run this code, actually I want to both processes print the message from "data". But only one does. What happens? Anyone can help?
#include <stdio.h>
main(){
int fd, pid;
char x;
fd = open("data",0); /* open file "data" */
pid = fork();
if(pid != 0){
wait(0);
... (2 Replies)
hello,
Every time i use fork() in the for loop, my college network(which i work in) either gets slow or hangs up.Can any 1 explain why it is so?
Of course there is no use of doing it though. But still i want to clear my doubt.
Thanks (2 Replies)
hi all
About this code
for (i = 1; i < n; i++)
if ((childpid = fork()) <= 0)
break;
I really can't understand the output .
and the way fork () return the value .
how about the process Id ,the child process Id and the parent ID
in this case
so please answer me soon (5 Replies)
Hi everybody,
I wanna write a code to understand how fork works.
my target
--------------
-Parent creates a file(called temp) and writes into this file "1".Then it closes the file.
-Then parent creates a child and wait until execution of this child ends.
-Then child opens the same... (3 Replies)
I need to write a program which creates some n number of processes first and also creates a fifo for each of them, then it connects to the server and..
I tried creating these processes with fork() in a for loop but it doesn't print out what i write inside the child..
for(int count = 0; count... (7 Replies)
Hello people.
I'm trying to do something like a search engine.
Server runs in the background by using ./server & which has data from a textfile stored in an array.
Client then runs by using ./client
It will then prompt "Search for:"
For example, if I searched for Products called Instant... (0 Replies)
I'm trying to run a simple test on how to use fork(), i'm able to execute the child process first then the parent, but how can I execute parent then child..?
Thanks! (1 Reply)
I understand that fork create a child but I need very simple example that make child useful....
I mean how will make the program faster anyone explain with code plz
using C plz (2 Replies)
Discussion started by: fwrlfo
2 Replies
LEARN ABOUT REDHAT
xquerytree
XQueryTree(3X11) XLIB FUNCTIONS XQueryTree(3X11)NAME
XQueryTree - query window tree information
SYNTAX
Status XQueryTree(display, w, root_return, parent_return, children_return, nchildren_return)
Display *display;
Window w;
Window *root_return;
Window *parent_return;
Window **children_return;
unsigned int *nchildren_return;
ARGUMENTS
children_return
Returns the list of children.
display Specifies the connection to the X server.
nchildren_return
Returns the number of children.
parent_return
Returns the parent window.
root_return
Returns the root window. you want to obtain
w Specifies the window whose list of children, root, parent, and number of children.
DESCRIPTION
The XQueryTree function returns the root ID, the parent window ID, a pointer to the list of children windows (NULL when there are no chil-
dren), and the number of children in the list for the specified window. The children are listed in current stacking order, from bottom-
most (first) to top-most (last). XQueryTree returns zero if it fails and nonzero if it succeeds. To free a non-NULL children list when it
is no longer needed, use XFree.
BUGS
This really should return a screen *, not a root window ID.
SEE ALSO XFree(3X11), XGetWindowAttributes(3X11), XQueryPointer(3X11)
Xlib - C Language X Interface
X Version 11 Release 6.6 XQueryTree(3X11)