12-12-2011
As always, I'm thankful for you answer
10 More Discussions You Might Find Interesting
1. Programming
hi there,
i was reading about the exec() function. and if i m not wrong, exec() kills your present process and starts a new process in its place. the process id remains the same.
then it says if exec is successful the text data and stack are overlayed by new file! -
i dont get this part "only... (2 Replies)
Discussion started by: a25khan
2 Replies
2. UNIX for Advanced & Expert Users
Hi,
Ho do I differentiate system call from library call?
for example if I am using chmod , how do I find out if it is a system call or library call?
Thanks
Muru (2 Replies)
Discussion started by: muru
2 Replies
3. Programming
Hi ,
Can anybody name any System Function in C/C++ for Sun-Solaris (unix) platform which can serve the alternative of execl() system function.
Actually I am calling a fork-execl() pair and then making an interprocess communication between these two(parent-child process). But the problem is... (3 Replies)
Discussion started by: Raj Kumar Arora
3 Replies
4. UNIX for Advanced & Expert Users
I would like to call a particular function in a C program using execl(). Is this possible using execl or anyother function ?
Thanks (2 Replies)
Discussion started by: vpraveen84
2 Replies
5. Shell Programming and Scripting
Hi All,
I want to execute a piped command like 'ls /opt | grep xml' using array as parameters list. How can I do that? (2 Replies)
Discussion started by: bharadiaam
2 Replies
6. Shell Programming and Scripting
Hi,
How to write a system calls in a script ?
> cd $HOME
> ls -ltr
thanks in advance.. (10 Replies)
Discussion started by: hegdeshashi
10 Replies
7. Shell Programming and Scripting
I am new in Perl.
I am working in simple script and the varibles are working well outside the exec or system command.
but they don't work as parameters to exec or system command.
The script is attached.
please help. (8 Replies)
Discussion started by: ahmed_zaher
8 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have to run two commands one after another from a c program. How can i do this with exec system calls. i tried giving them as argument to execv but it is not working.please help
thanks (3 Replies)
Discussion started by: suryashikha
3 Replies
9. Programming
I have a cgi script which is called after certain time interval, which has this:
system ("ls -l /tmp/cgic* | grep -v \"cgicsave.env\" | awk '{print $5}'");
During the execution of this script,the output is 0 sometimes. But due to this the system call is not working at all and doesnt o/p... (2 Replies)
Discussion started by: xs2punit
2 Replies
10. Programming
hi everyone
i wrote a system call and compiled the kernel succesfully...
my system call is in a file in the kernel folder named my_syscall1.c (kernel/my_syscall1.c)
the header file for this system call i added it in the folder include like this include/my_syscall1/my_syscall1.h
my problem is... (2 Replies)
Discussion started by: demis87
2 Replies
PASSTHRU(3) 1 PASSTHRU(3)
passthru - Execute an external program and display raw output
SYNOPSIS
void passthru (string $command, [int &$return_var])
DESCRIPTION
The passthru(3) function is similar to the exec(3) function in that it executes a $command. This function should be used in place of
exec(3) or system(3) when the output from the Unix command is binary data which needs to be passed directly back to the browser. A common
use for this is to execute something like the pbmplus utilities that can output an image stream directly. By setting the Content-type to
image/gif and then calling a pbmplus program to output a gif, you can create PHP scripts that output images directly.
PARAMETERS
o $command
- The command that will be executed.
o $return_var
- If the $return_var argument is present, the return status of the Unix command will be placed here.
RETURN VALUES
No value is returned.
NOTES
Warning
When allowing user-supplied data to be passed to this function, use escapeshellarg(3) or escapeshellcmd(3) to ensure that users can-
not trick the system into executing arbitrary commands.
Note
If a program is started with this function, in order for it to continue running in the background, the output of the program must be
redirected to a file or another output stream. Failing to do so will cause PHP to hang until the execution of the program ends.
Note
When safe mode is enabled, you can only execute files within the safe_mode_exec_dir. For practical reasons, it is currently not
allowed to have .. components in the path to the executable.
Warning
With safe mode enabled, the command string is escaped with escapeshellcmd(3). Thus, echo y | echo x becomes echo y | echo x.
SEE ALSO
exec(3), system(3), popen(3), escapeshellcmd(3), backtick operator.
PHP Documentation Group PASSTHRU(3)