10 More Discussions You Might Find Interesting
1. Ubuntu
Trying to get date into the txt file.
It says
Permission denied.
echo $(date +%I:%M:%S_%D) >> /tmp/systemd_suspend_test_err.txt
exec 2>> /tmp/systemd_suspend_test_err.txt
if ; then
# Do the thing you want before suspend here
echo "we are suspending $(date +%I:%M:%S_%D)."
elif ;... (5 Replies)
Discussion started by: drew77
5 Replies
2. UNIX for Dummies Questions & Answers
when i run echo "User” > /dev/tty5 why do i get permission denied? :confused: (2 Replies)
Discussion started by: chinababy
2 Replies
3. Solaris
Hello
I am working on a CPP code written for SUN CC 5.5
and make
we used make to compile the code then it compilation went smooth
now i am using gmake:
I have a make file like this
WSROOT=..
include $(WSROOT)/etc/wsmkinclude.common
all:
@for subdir in */Makefile; \
do \... (1 Reply)
Discussion started by: Revathi R
1 Replies
4. Programming
Hello
I am working on a CPP code written for SUN CC 5.5
and make
we used make to compile the code then it compilation went smooth
now i am using gmake:
I have a make file like this
WSROOT=..
include $(WSROOT)/etc/wsmkinclude.common
all:
@for subdir in */Makefile; \
do \... (1 Reply)
Discussion started by: Revathi R
1 Replies
5. AIX
I am having a code which will create archive after build.
Ibuild code on IBM AIX 5.3.
It supposed to create 2 archive after build.
I am getting 1st archive successfully but when build starts for second archive after some processing it throws an following error message-
ar cq... (4 Replies)
Discussion started by: milindb
4 Replies
6. HP-UX
Hi, I'm searching website where there is software for HP-UX operating system in free download because I must install Perl, Make and Gmake on HP-UX server. Have you goods URL for me ?
Thank you very much!
bye
Staaan (2 Replies)
Discussion started by: staaan
2 Replies
7. UNIX for Dummies Questions & Answers
I'll start off by saying that I know very little about Unix - however, I do know that I have a .profile file in my home directory, and that I should be able to invoke it by typing . profile. However, when I do this for ANY .filename, I get ".: Permission denied". I'm pretty sure that there is... (12 Replies)
Discussion started by: bbersani
12 Replies
8. Programming
I am working on solaris 9. and use gmake to compile and linke c/c++ program.
anybody can tell me the distinguish between gmake and make? :confused: (10 Replies)
Discussion started by: robin.zhu
10 Replies
9. UNIX for Dummies Questions & Answers
I just started computer science at UW Milwaukee. When I access the university Solaris system from PuTTY, I get permission denied when I try to access the file I wrote. Now I really have no idea what I'm doing, I just don't understand why I get permission denied in my won directory. Thank You
... (0 Replies)
Discussion started by: howeezy
0 Replies
10. UNIX for Dummies Questions & Answers
Could someone tell me why I am getting a permission denied message when I attempt to run this on an out file? Thanks! (8 Replies)
Discussion started by: trouscaillon
8 Replies
explain_execvp(3) Library Functions Manual explain_execvp(3)
NAME
explain_execvp - explain execvp(3) errors
SYNOPSIS
#include <libexplain/execvp.h>
const char *explain_execvp(const char *pathname, char *const *argv);
const char *explain_errno_execvp(int errnum, const char *pathname, char *const *argv);
void explain_message_execvp(char *message, int message_size, const char *pathname, char *const *argv);
void explain_message_errno_execvp(char *message, int message_size, int errnum, const char *pathname, char *const *argv);
DESCRIPTION
These functions may be used to obtain explanations for errors returned by the execvp(3) system call.
explain_execvp
const char *explain_execvp(const char *pathname, char *const *argv);
The explain_execvp function is used to obtain an explanation of an error returned by the execvp(3) system call. The least the message will
contain is the value of strerror(errno), but usually it will do much better, and indicate the underlying cause in more detail.
The errno global variable will be used to obtain the error value to be decoded.
This function is intended to be used in a fashion similar to the following example:
if (execvp(pathname, argv) < 0)
{
fprintf(stderr, "%s
", explain_execvp(pathname, argv));
exit(EXIT_FAILURE);
}
The above code example is available pre-packaged as the explain_execvp_or_die(3) function.
pathname
The original pathname, exactly as passed to the execvp(3) system call.
argv The original argv, exactly as passed to the execvp(3) system call.
Returns:
The message explaining the error. This message buffer is shared by all libexplain functions which do not supply a buffer in their
argument list. This will be overwritten by the next call to any libexplain function which shares this buffer, including other
threads.
Note: This function is not thread safe, because it shares a return buffer across all threads, and many other functions in this library.
explain_errno_execvp
const char *explain_errno_execvp(int errnum, const char *pathname, char *const *argv);
The explain_errno_execvp function is used to obtain an explanation of an error returned by the execvp(3) system call. The least the mes-
sage will contain is the value of strerror(errnum), but usually it will do much better, and indicate the underlying cause in more detail.
This function is intended to be used in a fashion similar to the following example:
if (execvp(pathname, argv) < 0)
{
int err = errno;
fprintf(stderr, "%s
", explain_errno_execvp(err,
pathname, argv));
exit(EXIT_FAILURE);
}
The above code example is available pre-packaged as the explain_execvp_or_die(3) function.
errnum The error value to be decoded, usually obtained from the errno global variable just before this function is called. This is neces-
sary if you need to call any code between the system call to be explained and this function, because many libc functions will alter
the value of errno.
pathname
The original pathname, exactly as passed to the execvp(3) system call.
argv The original argv, exactly as passed to the execvp(3) system call.
Returns:
The message explaining the error. This message buffer is shared by all libexplain functions which do not supply a buffer in their
argument list. This will be overwritten by the next call to any libexplain function which shares this buffer, including other
threads.
Note: This function is not thread safe, because it shares a return buffer across all threads, and many other functions in this library.
explain_message_execvp
void explain_message_execvp(char *message, int message_size, const char *pathname, char *const *argv);
The explain_message_execvp function may be used to obtain an explanation of an error returned by the execvp(3) system call. The least the
message will contain is the value of strerror(errno), but usually it will do much better, and indicate the underlying cause in more detail.
The errno global variable will be used to obtain the error value to be decoded.
This function is intended to be used in a fashion similar to the following example:
if (execvp(pathname, argv) < 0)
{
char message[3000];
explain_message_execvp(message, sizeof(message), pathname, argv);
fprintf(stderr, "%s
", message);
exit(EXIT_FAILURE);
}
The above code example is available pre-packaged as the explain_execvp_or_die(3) function.
message The location in which to store the returned message. If a suitable message return buffer is supplied, this function is thread
safe.
message_size
The size in bytes of the location in which to store the returned message.
pathname
The original pathname, exactly as passed to the execvp(3) system call.
argv The original argv, exactly as passed to the execvp(3) system call.
explain_message_errno_execvp
void explain_message_errno_execvp(char *message, int message_size, int errnum, const char *pathname, char *const *argv);
The explain_message_errno_execvp function may be used to obtain an explanation of an error returned by the execvp(3) system call. The
least the message will contain is the value of strerror(errnum), but usually it will do much better, and indicate the underlying cause in
more detail.
This function is intended to be used in a fashion similar to the following example:
if (execvp(pathname, argv) < 0)
{
int err = errno;
char message[3000];
explain_message_errno_execvp(message, sizeof(message),
err, pathname, argv);
fprintf(stderr, "%s
", message);
exit(EXIT_FAILURE);
}
The above code example is available pre-packaged as the explain_execvp_or_die(3) function.
message The location in which to store the returned message. If a suitable message return buffer is supplied, this function is thread
safe.
message_size
The size in bytes of the location in which to store the returned message.
errnum The error value to be decoded, usually obtained from the errno global variable just before this function is called. This is neces-
sary if you need to call any code between the system call to be explained and this function, because many libc functions will alter
the value of errno.
pathname
The original pathname, exactly as passed to the execvp(3) system call.
argv The original argv, exactly as passed to the execvp(3) system call.
SEE ALSO
execvp(3)
execute a file
explain_execvp_or_die(3)
execute a file and report errors
COPYRIGHT
libexplain version 0.52
Copyright (C) 2009 Peter Miller
explain_execvp(3)