05-02-2010
You can free the parameters in the parent process any time after you've fork()'d. After that, the child has its own copies to work from (which, as you say, don't need to be free()'d) and the parent has allocated memory it's not going to use, so it can be free()'d straight away.
What exactly does MATLAB complain about?
10 More Discussions You Might Find Interesting
1. Programming
Hi mates,
Is there any difference between execvp and execlp? any comment will be appreciated.
abdul:) (1 Reply)
Discussion started by: abdul
1 Replies
2. UNIX for Dummies Questions & Answers
what's the difference between the two? (3 Replies)
Discussion started by: hurleyint1386
3 Replies
3. UNIX for Dummies Questions & Answers
i am having an application that contains a push button.
On the click of this push button i want to call a executable file using execvp
function block fo2 push button
{
char *args;
args=NULL;
execvp("/home2/xyz/app1.exe",args)
}
but after compilation when i press this button the... (3 Replies)
Discussion started by: kunu
3 Replies
4. UNIX for Dummies Questions & Answers
I get this error :
execvp:ar:Arg list too long
when i am trying to link the .obj files created on unix box.
Any resolution to this?
Thanks
Mohit (1 Reply)
Discussion started by: mohitp
1 Replies
5. Programming
Hi ,
I m actually trying to implement pipes program,but after executing the execvp(),my program is getting hanged up :mad:
Actaully i m getting the desired output expected from execvp()...but once results are displayed on the output screen ,program is getting hanged up
values of... (3 Replies)
Discussion started by: Crab
3 Replies
6. UNIX for Advanced & Expert Users
Hi All,
sorry it was application related.. i am deleting it
Thanks & Regards
Shihab (0 Replies)
Discussion started by: shihabvk
0 Replies
7. 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
8. AIX
Hello,
On Aix 5.2, we changed the parameters tcp_keepinit, tcp_keepintvl and tcp_keepidle with the no command.
tunrestore -R is present in inittab
in the directory /etc/tunables we can clearly see the inclusion of parameters during reboot, including the file lastboot.log
... (0 Replies)
Discussion started by: dantares
0 Replies
9. Programming
Hi,
I'm trying to build my own little shell as an exercise. I want to run emacs from my shell so I'm using execvp() command. The problem is when I run it with arguments at background (e.g "emacs file1 &") it stays "hung" (I don't get the prompt back) while without arguments it runs ok ("emacs... (1 Reply)
Discussion started by: Rap_master
1 Replies
10. Programming
I had been looking at page 75 of this online book:
http://richard.esplins.org/static/downloads/linux_book.pdf
I've used the system function in C to call bash commands before, but wanted to learn this way too. The solution in the book worked perfectly. However, I tried changing the simple "ls -l... (3 Replies)
Discussion started by: Azrael
3 Replies
LEARN ABOUT DEBIAN
explain_execvp_or_die
explain_execvp_or_die(3) Library Functions Manual explain_execvp_or_die(3)
NAME
explain_execvp_or_die - execute a file and report errors
SYNOPSIS
#include <libexplain/execvp.h>
void explain_execvp_or_die(const char *pathname, char *const *argv);
DESCRIPTION
The explain_execvp_or_die function is used to call the execvp(3) system call. On failure an explanation will be printed to stderr,
obtained from explain_execvp(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_execvp_or_die(pathname, argv);
pathname
The pathname, exactly as to be passed to the execvp(3) system call.
argv The argv, exactly as to be passed to the execvp(3) system call.
Returns:
This function only returns on success. On failure, prints an explanation and exits.
SEE ALSO
execvp(3)
execute a file
explain_execvp(3)
explain execvp(3) errors
exit(2) terminate the calling process
COPYRIGHT
libexplain version 0.52
Copyright (C) 2009 Peter Miller
explain_execvp_or_die(3)