Sponsored Content
Full Discussion: two questions
Top Forums Programming two questions Post 302259145 by Corona688 on Monday 17th of November 2008 11:05:02 AM
Old 11-17-2008
Did you:
Code:
#include <sys/types.h>
#include <sys/wait.h>

...at the top of your code? waitpid needs both.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

i got some questions :)

Hi! Im new to all this but the computer club im in has unix i think. now my questions. 1.is it NTFS i need to partion the harddrive with to be able to use unix? 2.Unix and Linux whats the diffrense?yes im a noob got no idea been using crap windows for ages and hate it. 3.I got a win98... (2 Replies)
Discussion started by: Pierre
2 Replies

2. Programming

C questions

What does "extern" do? ex. extern int x; and another question, what about using static in functions? like: static void foo(), why? (2 Replies)
Discussion started by: Esaia
2 Replies

3. Solaris

2 Questions

Hello Everbody I hope you can give me a hand, I have some questions The first one itīs about some message that I donīt know what means, I was looking about it. but nothing. This is the message rsh: connection from bad port bsd-gw: Error reading from connection: Bad file number And my... (4 Replies)
Discussion started by: lo-lp-kl
4 Replies

4. UNIX for Dummies Questions & Answers

Just a few questions.

Hi everyone im new to this forums, i just wanted to get started by asking a few question(Im a Unix newbie) 1. How do i sort a file called "dirr" in a ascending order on the 3rd column 2. what does alias on=who do Thanks in advance!!! (1 Reply)
Discussion started by: Da Paper
1 Replies

5. UNIX for Advanced & Expert Users

can any one help me out this questions.....

How do you locate all nonblank lines that don't begin with #, /* ,or // ? (3 Replies)
Discussion started by: pulsar2587
3 Replies

6. Homework & Coursework Questions

Print questions from a questions folder in a sequential order

1.) I am to write scripts that will be phasetest folder in the home directory. 2.) The folder should have a set-up,phase and display files I have written a small script which i used to check for the existing users and their password. What I need help with: I have a set of questions in a... (19 Replies)
Discussion started by: moraks007
19 Replies

7. UNIX for Dummies Questions & Answers

Just had a few questions

1) The lpr and sort utilities accept input either from a file named on the command line or from standard input. a)Name two other utilities that function in a similar manner. b)Name a utility that accepts its input only from standard input. 2) Explain the following error message. What... (10 Replies)
Discussion started by: youngyou
10 Replies

8. UNIX for Dummies Questions & Answers

Vi questions

Hello, I would like to know how we can highlight/select a section of a file in vi and delete that section if we don't want to use the dd command to delete one line at at time. There is one where we don't want to delete the whole line , but up to a certain word. (2 Replies)
Discussion started by: Pouchie1
2 Replies
WAIT4(2)						     Linux Programmer's Manual							  WAIT4(2)

NAME
wait3, wait4 - wait for process to change state, BSD style SYNOPSIS
#include <sys/types.h> #include <sys/time.h> #include <sys/resource.h> #include <sys/wait.h> pid_t wait3(int *status, int options, struct rusage *rusage); pid_t wait4(pid_t pid, int *status, int options, struct rusage *rusage); Feature Test Macro Requirements for glibc (see feature_test_macros(7)): wait3(): _BSD_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED wait4(): _BSD_SOURCE DESCRIPTION
These functions are obsolete; use waitpid(2) or waitid(2) in new programs. The wait3() and wait4() system calls are similar to waitpid(2), but additionally return resource usage information about the child in the structure pointed to by rusage. Other than the use of the rusage argument, the following wait3() call: wait3(status, options, rusage); is equivalent to: waitpid(-1, status, options); Similarly, the following wait4() call: wait4(pid, status, options, rusage); is equivalent to: waitpid(pid, status, options); In other words, wait3() waits of any child, while wait4() can be used to select a specific child, or children, on which to wait. See wait(2) for further details. If rusage is not NULL, the struct rusage to which it points will be filled with accounting information about the child. See getrusage(2) for details. RETURN VALUE
As for waitpid(2). ERRORS
As for waitpid(2). CONFORMING TO
4.3BSD. SUSv1 included a specification of wait3(); SUSv2 included wait3(), but marked it LEGACY; SUSv3 removed it. NOTES
Including <sys/time.h> is not required these days, but increases portability. (Indeed, <sys/resource.h> defines the rusage structure with fields of type struct timeval defined in <sys/time.h>.) On Linux, wait3() is a library function implemented on top of the wait4() system call. SEE ALSO
fork(2), getrusage(2), sigaction(2), signal(2), wait(2), signal(7) COLOPHON
This page is part of release 3.44 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2012-09-23 WAIT4(2)
All times are GMT -4. The time now is 09:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy