Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

explain_dup_or_die(3) [debian man page]

explain_dup_or_die(3)					     Library Functions Manual					     explain_dup_or_die(3)

NAME
explain_dup_or_die - duplicate a file descriptor and report errors SYNOPSIS
#include <libexplain/dup.h> void explain_dup_or_die(int fildes); DESCRIPTION
The explain_dup_or_die function is used to call the dup(2) system call. On failure an explanation will be printed to stderr, obtained from explain_dup(3), and then the process terminates by calling exit(EXIT_FAILURE). This function is intended to be used in a fashion similar to the following example: explain_dup_or_die(fildes); fildes The fildes, exactly as to be passed to the dup(2) system call. Returns: This function only returns on success. On failure, prints an explanation and exits. SEE ALSO
dup(2) duplicate a file descriptor explain_dup(3) explain dup(2) errors exit(2) terminate the calling process COPYRIGHT
libexplain version 0.52 Copyright (C) 2008 Peter Miller explain_dup_or_die(3)

Check Out this Related Man Page

explain_write_or_die(3) 				     Library Functions Manual					   explain_write_or_die(3)

NAME
explain_write_or_die - write to a file descriptor and report errors SYNOPSIS
#include <libexplain/write.h> void explain_write_or_die(int fildes, const void *data, long data_size); DESCRIPTION
The explain_write_or_die function is used to call the write(2) system call. On failure an explanation will be printed to stderr, obtained from explain_write(3), and then the process terminates by calling exit(EXIT_FAILURE). This function is intended to be used in a fashion similar to the following example: ssize_t result = explain_write_or_die(fildes, data, data_size); fildes The fildes, exactly as to be passed to the write(2) system call. data The data, exactly as to be passed to the write(2) system call. data_size The data_size, exactly as to be passed to the write(2) system call. Returns: This function only returns on success. On failure, prints an explanation and exits. SEE ALSO
write(2) write to a file descriptor explain_write(3) explain write(2) errors exit(2) terminate the calling process COPYRIGHT
libexplain version 0.52 Copyright (C) 2008 Peter Miller explain_write_or_die(3)
Man Page

6 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. Programming

dup()

Would anyone be so kind to explain to me the function of dup() in UNIX? As far as I am concerned, it duplicates a file descriptor. Under what circumstances would we need to duplicate a file descriptor in a UNIX environment? Thank you. vinchen (3 Replies)
Discussion started by: vinchen
3 Replies

3. Programming

Shell Implementation not working correctly

//save in/out int tmpin = dup(0); int tmpout = dup(1); //set initial input int fdin; if(_inputFile) { fdin = open(_inputFile, O_RDONLY | O_CREAT, S_IREAD | S_IWRITE); } else { //use default input fdin = dup(tmpin); } int ret; int fdout; for(int i = 0; i... (14 Replies)
Discussion started by: AirBronto
14 Replies

4. Shell Programming and Scripting

Delete duplicate data and pertain the latest month data.

Hi I have a file with following records It contains three months of data, some data is duplicated,i need to access the latest data from the duplicate ones. for e.g; i have foll data "200","0","","11722","-63","","","","11722","JUL","09" "200","0","","11722","-63","","","","11722","JUL","09"... (10 Replies)
Discussion started by: vee_789
10 Replies

5. UNIX for Dummies Questions & Answers

report duplicate

Hi i have a file with one column and want to report the value that has duplicate like rag rag hi hi hi 123 456 output should be rag hi thank you (6 Replies)
Discussion started by: thonlun
6 Replies

6. UNIX and Linux Applications

Deja-dup make my / full. So I cannot restore my back up

The problematic directory is the following: /root/.cache/deja-dup This directory grows until my "/" is full and then the restoring activity fails. I already tried to create a symbolic link with origin another partition where I have more space. However during the restoring activity ... (4 Replies)
Discussion started by: puertas12
4 Replies