Sponsored Content
Full Discussion: exec() system call
Top Forums Programming exec() system call Post 47096 by Perderabo on Monday 2nd of February 2004 10:10:30 PM
Old 02-02-2004
No part of the program is in the user area. Exactly what is there varies from one version of unix to the next. But some possible examples:

process start time
controlling terminal of process
current directory of the process
size of the stack
size of the data segment
uid of the process

In short its a bunch of stuff that the kernel needs to manage the process. But the kernel stores it in the process to keep the kernel small. This made sense when computers had 16 bit addresses. It makes less sense these days with 32 or even 64 bit addresses. Some kernels are moving a lot of stuff out of the uarea and into the proc table.

If you poke around /usr/include, you may find user.h which will show exactly what's in your uarea.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

how to differentiate system call from library call

Hi, Ho do I differentiate system call from library call? for example if I am using chmod , how do I find out if it is a system call or library call? Thanks Muru (2 Replies)
Discussion started by: muru
2 Replies

2. Programming

alternatives of exec() system function

Hi , Can anybody name any System Function in C/C++ for Sun-Solaris (unix) platform which can serve the alternative of execl() system function. Actually I am calling a fork-execl() pair and then making an interprocess communication between these two(parent-child process). But the problem is... (3 Replies)
Discussion started by: Raj Kumar Arora
3 Replies

3. UNIX for Advanced & Expert Users

exec to call specific function in C prog

I would like to call a particular function in a C program using execl(). Is this possible using execl or anyother function ? Thanks (2 Replies)
Discussion started by: vpraveen84
2 Replies

4. Shell Programming and Scripting

How to execute piped command using exec or system

Hi All, I want to execute a piped command like 'ls /opt | grep xml' using array as parameters list. How can I do that? (2 Replies)
Discussion started by: bharadiaam
2 Replies

5. Shell Programming and Scripting

system call

Hi, How to write a system calls in a script ? > cd $HOME > ls -ltr thanks in advance.. (10 Replies)
Discussion started by: hegdeshashi
10 Replies

6. Shell Programming and Scripting

Perl variables in exec or system

I am new in Perl. I am working in simple script and the varibles are working well outside the exec or system command. but they don't work as parameters to exec or system command. The script is attached. please help. (8 Replies)
Discussion started by: ahmed_zaher
8 Replies

7. UNIX for Dummies Questions & Answers

How to run two commands from a exec call in a c program

Hi, I have to run two commands one after another from a c program. How can i do this with exec system calls. i tried giving them as argument to execv but it is not working.please help thanks (3 Replies)
Discussion started by: suryashikha
3 Replies

8. Programming

system call

I have a cgi script which is called after certain time interval, which has this: system ("ls -l /tmp/cgic* | grep -v \"cgicsave.env\" | awk '{print $5}'"); During the execution of this script,the output is 0 sometimes. But due to this the system call is not working at all and doesnt o/p... (2 Replies)
Discussion started by: xs2punit
2 Replies

9. Programming

need help with system call

hi everyone i wrote a system call and compiled the kernel succesfully... my system call is in a file in the kernel folder named my_syscall1.c (kernel/my_syscall1.c) the header file for this system call i added it in the folder include like this include/my_syscall1/my_syscall1.h my problem is... (2 Replies)
Discussion started by: demis87
2 Replies

10. Programming

[C] exec system call

Hi again ;) Now I want to make a program that will execute the programs with exec, asking the user if he wants the program to run in background or foreground. scanf("%c",&caracter); if (caracter=='y'){ printf("Has decidido ejecutarlo en background\n"); if((pid=fork())==0) {// fork para... (3 Replies)
Discussion started by: lamachejo
3 Replies
TCGETPGRP(3)						     Linux Programmer's Manual						      TCGETPGRP(3)

NAME
tcgetpgrp, tcsetpgrp - get and set terminal foreground process group SYNOPSIS
#include <unistd.h> pid_t tcgetpgrp(int fd); int tcsetpgrp(int fd, pid_t pgrp); DESCRIPTION
The function tcgetpgrp() returns the process group ID of the foreground process group on the terminal associated to fd, which must be the controlling terminal of the calling process. The function tcsetpgrp() makes the process group with process group ID pgrp the foreground process group on the terminal associated to fd, which must be the controlling terminal of the calling process, and still be associated with its session. Moreover, pgrp must be a (nonempty) process group belonging to the same session as the calling process. If tcsetpgrp() is called by a member of a background process group in its session, and the calling process is not blocking or ignoring SIGTTOU, a SIGTTOU signal is sent to all members of this background process group. RETURN VALUE
When fd refers to the controlling terminal of the calling process, the function tcgetpgrp() will return the foreground process group ID of that terminal if there is one, and some value larger than 1 that is not presently a process group ID otherwise. When fd does not refer to the controlling terminal of the calling process, -1 is returned, and errno is set appropriately. When successful, tcsetpgrp() returns 0. Otherwise, it returns -1, and errno is set appropriately. ERRORS
EBADF fd is not a valid file descriptor. EINVAL pgrp has an unsupported value. ENOTTY The calling process does not have a controlling terminal, or it has one but it is not described by fd, or, for tcsetpgrp(), this controlling terminal is no longer associated with the session of the calling process. EPERM pgrp has a supported value, but is not the process group ID of a process in the same session as the calling process. CONFORMING TO
POSIX.1-2001. NOTES
These functions are implemented via the TIOCGPGRP and TIOCSPGRP ioctls. History The ioctls appeared in 4.2BSD. The functions are POSIX inventions. SEE ALSO
setpgid(2), setsid(2), credentials(7) COLOPHON
This page is part of release 3.25 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/. GNU
2003-01-28 TCGETPGRP(3)
All times are GMT -4. The time now is 06:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy