Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

coe(3) [debian man page]

coe(3)							     Library Functions Manual							    coe(3)

NAME
coe - set close-on-exec flag for a descriptor SYNTAX
#include <coe.h> int coe(fd); int fd; DESCRIPTION
coe sets the close-on-exec flag for file descriptor fd, returning 0 if it was successful or -1 on error. If coe is successful, fd will be closed when the process calls execve. SEE ALSO
execve(2), fcntl(2) coe(3)

Check Out this Related Man Page

CLOSE(2)							System Calls Manual							  CLOSE(2)

NAME
close - delete a descriptor SYNOPSIS
close(d) int d; DESCRIPTION
The close call deletes a descriptor from the per-process object reference table. If this is the last reference to the underlying object, then it will be deactivated. For example, on the last close of a file the current seek pointer associated with the file is lost; on the last close of a socket(2) associated naming information and queued data are discarded; on the last close of a file holding an advisory lock the lock is released (see further flock(2)). A close of all of a process's descriptors is automatic on exit, but since there is a limit on the number of active descriptors per process, close is necessary for programs that deal with many descriptors. When a process forks (see fork(2)), all descriptors for the new child process reference the same objects as they did in the parent before the fork. If a new process is then to be run using execve(2), the process would normally inherit these descriptors. Most of the descrip- tors can be rearranged with dup2(2) or deleted with close before the execve is attempted, but if some of these descriptors will still be needed if the execve fails, it is necessary to arrange for them to be closed if the execve succeeds. For this reason, the call ``fcntl(d, F_SETFD, 1)'' is provided, which arranges that a descriptor will be closed after a successful execve; the call ``fcntl(d, F_SETFD, 0)'' restores the default, which is to not close the descriptor. RETURN VALUE
Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and the global integer variable errno is set to indicate the error. ERRORS
Close will fail if: [EBADF] D is not an active descriptor. SEE ALSO
accept(2), flock(2), open(2), pipe(2), socket(2), socketpair(2), execve(2), fcntl(2) 4th Berkeley Distribution May 22, 1986 CLOSE(2)
Man Page

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how two OS coexist in one computer?

hi, i'm a new user and in order to be frank.here maybe a ordinary question to every newbie: How to setup unix and windows system one and only computer? (1 Reply)
Discussion started by: RUC
1 Replies

2. Filesystems, Disks and Memory

Can Veritas DMP & EMC PowerPath coexist?

We currently have a Solaris box connected to a Clariion storage system that is utilising DMP for path failover. I would prefer to use EMC's Powerpath and was wondering if the two can coexist? Basically, I am struggling to find any documentation on the subject and was wonder if anyone can give me... (2 Replies)
Discussion started by: aaron2k
2 Replies

3. Shell Programming and Scripting

stored procoedure bind variables in shell

Hi , I have a pl/sql procedure which takes its input from a shell script, and deletes rows from db table based on the input. I've dbms_output.put_line statments in procedure which i want to capture and display in the script for example, if no rows have been deleted, i have to stop executing... (1 Reply)
Discussion started by: justchill
1 Replies

4. Shell Programming and Scripting

correlation coefficient - Awk

Hi guys I have an input file with multiple columns and and rows. Is it possible to calculate correlation of certain value of certain No (For example x of S1 = 112) with all other values (for example start with x 112 corr a 3 of S1 = x-a 0.2 ) INPUT ******* No S1 S2 S3 S4 Sn a 3 ... (2 Replies)
Discussion started by: quincyjones
2 Replies

5. Shell Programming and Scripting

perl Can't coerce array into hash at

Hi guys I have this part of a perl script that returns and odd error if ($args{software}) { print " @DISTFILE_GROUPS $output->{distfile_groups}->{ get_rdist_groups}\n"; and the error is Can't coerce array into hash at i've never seed this error before, any ideas thanks... (0 Replies)
Discussion started by: ab52
0 Replies

6. Shell Programming and Scripting

Help with identify gradient and the coefficient of determination of a straight line

Hi, Do anybody experience using awk or perl command to identify gradient of a straight line and The coefficient of determination/R-square value of a chart (R2) ? Below is my input file : t1 2 3 5 8 t2 0 2 0 2 t3 1 1 1 1 t4 50 70 80 90 . . . Desired Output : t1 2 3 5 8 0.6986... (10 Replies)
Discussion started by: perl_beginner
10 Replies

7. UNIX for Beginners Questions & Answers

Co existence (Coex) Batch app

can application lock or release the resource in OS in unix? how? ORIGINAL THREAD content: There is a batch app and co existence (Coex) Batch app running in a same server. What is co- existence batch app? what is it purpose, why can't put everything in one batch app? Restored to original -... (1 Reply)
Discussion started by: houmingc
1 Replies