explain_execlp_or_die(3) Library Functions Manual explain_execlp_or_die(3)NAME
explain_execlp_or_die - execute a file and report errors
SYNOPSIS
#include <libexplain/execlp.h>
void explain_execlp_or_die(, ...);
int explain_execlp_on_error(, ...);
DESCRIPTION
The explain_execlp_or_die function is used to call the execlp(3) system call. On failure an explanation will be printed to stderr, obtained
from the explain_execlp(3) function, and then the process terminates by calling exit(EXIT_FAILURE).
The explain_execlp_on_error function is used to call the execlp(3) system call. On failure an explanation will be printed to stderr,
obtained from the explain_execlp(3) function, but still returns to the caller.
RETURN VALUE
The explain_execlp_or_die function only returns on success, see execlp(3) for more information. On failure, prints an explanation and
exits, it does not return.
The explain_execlp_on_error function always returns the value return by the wrapped execlp(3) system call.
EXAMPLE
The explain_execlp_or_die function is intended to be used in a fashion similar to the following example:
explain_execlp_or_die();
SEE ALSO execlp(3)
execute a file
explain_execlp(3)
explain execlp(3) errors
exit(2) terminate the calling process
COPYRIGHT
libexplain version 0.52
Copyright (C) 2009 Peter Miller
explain_execlp_or_die(3)
Check Out this Related Man Page
explain_socketpair_or_die(3) Library Functions Manual explain_socketpair_or_die(3)NAME
explain_socketpair_or_die - create pair of connected sockets and report errors
SYNOPSIS
#include <libexplain/socketpair.h>
void explain_socketpair_or_die(int domain, int type, int protocol, int *sv);
int explain_socketpair_on_error(int domain, int type, int protocol, int *sv);
DESCRIPTION
The explain_socketpair_or_die function is used to call the socketpair(2) system call. On failure an explanation will be printed to stderr,
obtained from the explain_socketpair(3) function, and then the process terminates by calling exit(EXIT_FAILURE).
The explain_socketpair_on_error function is used to call the socketpair(2) system call. On failure an explanation will be printed to
stderr, obtained from the explain_socketpair(3) function, but still returns to the caller.
domain The domain, exactly as to be passed to the socketpair(2) system call.
type The type, exactly as to be passed to the socketpair(2) system call.
protocol
The protocol, exactly as to be passed to the socketpair(2) system call.
sv The sv, exactly as to be passed to the socketpair(2) system call.
RETURN VALUE
The explain_socketpair_or_die function only returns on success, see socketpair(2) for more information. On failure, prints an explanation
and exits, it does not return.
The explain_socketpair_on_error function always returns the value return by the wrapped socketpair(2) system call.
EXAMPLE
The explain_socketpair_or_die function is intended to be used in a fashion similar to the following example:
explain_socketpair_or_die(domain, type, protocol, sv);
SEE ALSO socketpair(2)
create a pair of connected sockets
explain_socketpair(3)
explain socketpair(2) errors
exit(2) terminate the calling process
COPYRIGHT
libexplain version 0.52
Copyright (C) 2010 Peter Miller
explain_socketpair_or_die(3)
I want write a program using C to mimic a shell program for Unix.
When I use
execlp("set","set", "MY", "name", NULL);
, it does not work. However,
execlp("/usr/bin/ls"."ls","-la",NULL);
Works normally.
Another problem, when I use
setenv("PATH","mypath");
I can not complie my... (2 Replies)
Hi, I have a very small program where I call execlp() to execute sort.
Everything works fine. But sort has a -T option which can be used to specify a temporary directory. Now when I use -T with execlp() it does not work.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include... (4 Replies)
Hi All,
can you please explain me the meaning of this line--
BackupLocation="/inpass/abc"
Parent=$(expr $BackupLocation : '\(.*\)/.*' \| $BackupLocation)
when i ran this as a command also it did not show me anything so could not get the purpose of this line.
Explain it please. (3 Replies)
Hi All,
I am new to Linux and i need your for a program which makes the exact copy of the running process. I have got some codes but it only works for the first command and will not work for subsequent commands. Means it works for "ps" but will not work for "ps u". I have changed the code to... (1 Reply)
Hello everyone, this is my first post.
I have a task to use a fork to create multiple processes and then use execlp to run another program to add 2 numbers.
The problem I am having is we are supposed to use the exit() call in the execlp to return the small integer. This is a bad way to... (3 Replies)
Hi everyone,
I am new to this forum and this is my very first post, one i think i will look back at many years from now and have nothing to regret about.
This is simply because i recently installed Linux (Ubuntu) on my system and downloaded a book titled, The Unix Programming Environment. I... (7 Replies)