Sponsored Content
Full Discussion: system calls in C
Top Forums UNIX for Dummies Questions & Answers system calls in C Post 302514673 by fpmurphy on Sunday 17th of April 2011 10:57:18 AM
Old 04-17-2011
What operating system are you using?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

System Calls

What does the system call "dup" do? What is the difference between dup and dup2 I have a fair idea of what it does but I am confused when its coming down to the exact details... Please help me!:confused: (2 Replies)
Discussion started by: clickonline1
2 Replies

2. UNIX for Dummies Questions & Answers

System calls for cp and mv

Which system calls are made for operations cp and mv (2 Replies)
Discussion started by: gaurava99
2 Replies

3. UNIX for Dummies Questions & Answers

System calls?

open, creat, read, write, lseek and close Are they all primitive? :confused: *Another Question: is there a different between a system call, and an i/o system call? (2 Replies)
Discussion started by: PlunderBunny
2 Replies

4. Solaris

System calls ?

where can i find the differences in System calls between solaris and aix? also is it possible to find a comprehensive list of them? (1 Reply)
Discussion started by: TECHRAMESH
1 Replies

5. UNIX Desktop Questions & Answers

Using system calls

Hi, I'm new to UNIX system calls. Can someone share your knowledge as to how exactly system calls should be executed? Can they be typed like commands such as mkdir on the terminal itself? Also, are there any websites which will show me an example of the output to expect when a system call like... (1 Reply)
Discussion started by: ilavenil
1 Replies

6. Programming

System calls

why user is not able to switch from user to kernel mode by writing the function whose code is identical to system call. (1 Reply)
Discussion started by: joshighanshyam
1 Replies

7. BSD

system calls

what is the functions and relationship between fork,exec,wait system calls as i am a beginer just want the fundamentals. (1 Reply)
Discussion started by: sangramdas
1 Replies

8. UNIX for Dummies Questions & Answers

About system calls.

Hi all, I am new here . I want to know about system call in detail. As system calls are also function .How system identifies it.:) (2 Replies)
Discussion started by: vishwasrao
2 Replies

9. UNIX for Dummies Questions & Answers

System calls in UNIX

Hi i am very new to programming in UNIX and don't understand the difference between a system call and a normal function call. Also can I implement system calls from within a program? If so could someone please give me an example of a system call from within a program. Lastly, when creating a... (1 Reply)
Discussion started by: bjhum33
1 Replies

10. Programming

Are system calls in c language only????

Hi friends, I have three questions. 1) What are system calls? 2) Is it necessary that system calls be in c language (in unix operating system)? 3) Importance of c language when programming in unix environment??? Looking forward to your wonderful replies! ... (2 Replies)
Discussion started by: gabam
2 Replies
GETPGRP(2)						      BSD System Calls Manual							GETPGRP(2)

NAME
getpgrp -- get process group LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <unistd.h> pid_t getpgrp(void); pid_t getpgid(pid_t pid); DESCRIPTION
The process group of the current process is returned by getpgrp(). The process group of the process identified by pid is returned by getpgid(). If pid is zero, getpgid() returns the process group of the current process. Process groups are used for distribution of signals, and by terminals to arbitrate requests for their input: processes that have the same process group as the terminal are foreground and may read, while others will block with a signal if they attempt to read. This system call is thus used by programs such as csh(1) to create process groups in implementing job control. The tcgetpgrp() and tcsetpgrp() calls are used to get/set the process group of the control terminal. RETURN VALUES
The getpgrp() system call always succeeds. Upon successful completion, the getpgid() system call returns the process group of the specified process; otherwise, it returns a value of -1 and sets errno to indicate the error. COMPATIBILITY
This version of getpgrp() differs from past Berkeley versions by not taking a pid_t pid argument. This incompatibility is required by ISO/IEC 9945-1:1990 (``POSIX.1''). From the ISO/IEC 9945-1:1990 (``POSIX.1'') Rationale: 4.3BSD provides a getpgrp() system call that returns the process group ID for a specified process. Although this function is used to support job control, all known job-control shells always specify the calling process with this function. Thus, the simpler AT&T System V UNIX getpgrp() suffices, and the added complexity of the 4.3BSD getpgrp() has been omitted from POSIX.1. The old functionality is available from the getpgid() system call. ERRORS
The getpgid() system call will succeed unless: [ESRCH] there is no process whose process ID equals pid SEE ALSO
getsid(2), setpgid(2), termios(4) STANDARDS
The getpgrp() system call is expected to conform to ISO/IEC 9945-1:1990 (``POSIX.1''). HISTORY
The getpgrp() system call appeared in 4.0BSD. The getpgid() system call is derived from its usage in AT&T System V Release 4 UNIX. BSD
June 4, 1993 BSD
All times are GMT -4. The time now is 08:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy