Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

explain_tmpfile_or_die(3) [debian man page]

explain_tmpfile_or_die(3)				     Library Functions Manual					 explain_tmpfile_or_die(3)

NAME
explain_tmpfile_or_die - create a temporary file and report errors SYNOPSIS
#include <libexplain/tmpfile.h> FILE *explain_tmpfile_or_die(void); FILE *explain_tmpfile_on_error(void); DESCRIPTION
The explain_tmpfile_or_die function is used to call the tmpfile(3) system call. On failure an explanation will be printed to stderr, obtained from the explain_tmpfile(3) function, and then the process terminates by calling exit(EXIT_FAILURE). The explain_tmpfile_on_error function is used to call the tmpfile(3) system call. On failure an explanation will be printed to stderr, obtained from the explain_tmpfile(3) function, but still returns to the caller. RETURN VALUE
The explain_tmpfile_or_die function only returns on success, see tmpfile(3) for more information. On failure, prints an explanation and exits, it does not return. The explain_tmpfile_on_error function always returns the value return by the wrapped tmpfile(3) system call. EXAMPLE
The explain_tmpfile_or_die function is intended to be used in a fashion similar to the following example: FILE *result = explain_tmpfile_or_die(); SEE ALSO
tmpfile(3) create a temporary file explain_tmpfile(3) explain tmpfile(3) errors exit(2) terminate the calling process COPYRIGHT
libexplain version 0.52 Copyright (C) 2009 Peter Miller explain_tmpfile_or_die(3)

Check Out this Related Man Page

explain_getpgrp_or_die(3)				     Library Functions Manual					 explain_getpgrp_or_die(3)

NAME
explain_getpgrp_or_die - get process group and report errors SYNOPSIS
#include <libexplain/getpgrp.h> pid_t explain_getpgrp_or_die(pid_t pid); pid_t explain_getpgrp_on_error(pid_t pid); DESCRIPTION
The explain_getpgrp_or_die function is used to call the getpgrp(2) system call. On failure an explanation will be printed to stderr, obtained from the explain_getpgrp(3) function, and then the process terminates by calling exit(EXIT_FAILURE). The explain_getpgrp_on_error function is used to call the getpgrp(2) system call. On failure an explanation will be printed to stderr, obtained from the explain_getpgrp(3) function, but still returns to the caller. pid The pid, exactly as to be passed to the getpgrp(2) system call. API Inconsistencies Note: the getpgrp(2) function has two implementations. The POSIX.1 version has no arguments, while the BSD version has one argument. For simplicity of implementation, the argument list seen here includes the pid argument. The POSIX.1 getpgid() semanatics can be obtained by calling getpgrp(0) on BSD systems, and this is the API for libexplain, even on systems that do not use the BSD API. RETURN VALUE
The explain_getpgrp_or_die function only returns on success, see getpgrp(2) for more information. On failure, prints an explanation and exits, it does not return. The explain_getpgrp_on_error function always returns the value return by the wrapped getpgrp(2) system call. EXAMPLE
The explain_getpgrp_or_die function is intended to be used in a fashion similar to the following example: pid_t result = explain_getpgrp_or_die(pid); SEE ALSO
getpgrp(2) get process group explain_getpgrp(3) explain getpgrp(2) errors exit(2) terminate the calling process COPYRIGHT
libexplain version 0.52 Copyright (C) 2011 Peter Miller explain_getpgrp_or_die(3)
Man Page

6 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Sed command help reqiored

Can somebody explain me what exactly will happen with this command, step by step. eval sed " -e 's/?1/${JOB_NAME}/g' -e 's/?DT/${DT}/g'" ${SCRIPT_1} > ${SCRIPT_1_2} 2> ${tmpfile} (1 Reply)
Discussion started by: satgur
1 Replies

2. UNIX for Dummies Questions & Answers

deleting another user's files

hi, I have two users, let us call them A and B. I do as User A touch tmpfile chmod 700 tmpfile Now as User B I do rm tmpfile - and it allows me to do it (after prompting me)...why? If I had done chmod 777 tmpfile, then sure User B should be able to delete it, but I did chmod 700... (3 Replies)
Discussion started by: JamesByars
3 Replies

3. Shell Programming and Scripting

best way to insert a line at the top of a file?

say I want to insert "this is a test" as the first line into file A, besides echo "this is a test" > /tmp/tmpfile cat /tmp/tmpfile fileA >> /tmp/result, is there any simple way I can do it? thanks (7 Replies)
Discussion started by: fedora
7 Replies

4. Shell Programming and Scripting

Text data string conversion to Integer

Folks Appreciate your help in understanding issue in relation to below. I need to pul uvalue from a file (tmpfile) and compare it with a number to make decision. Using #!/bin/sh contents of tmpfile : Slot uvalue : 0.16 How I am pulling it: unifval=`awk '/uvalue/ {print $4}' tmpfile` ... (1 Reply)
Discussion started by: wndgs
1 Replies

5. Solaris

No space left on device

We are using this function tmpfile() : FILE *tmpfp ; if ((tmpfp = tmpfile()) == NULL) { fprintf(stderr, "%s: ERROR: init_operator(): ", ROUTINE); perror("tmpfile()"); exit(ERR_OPEN); } and the above is raising error : MSMD0603: ERROR:... (3 Replies)
Discussion started by: atiato
3 Replies

6. Shell Programming and Scripting

optargs processing

Hello i'm writing some analyzing script and i'm giving to my program these parameters, for example: ./procinfo -r tmpfile sh -c "cat tmpfile" where -r is proccessed in getopts and it takes an argument by OPTARG.. The thing is I need to save this part to some variable: sh -c "cat tmpfile"... (4 Replies)
Discussion started by: midin
4 Replies