I'm testing the php exec command:
http://php.net/exec
and I'm getting back a result code of 127.
My php code is:
<?
print "<br>executing 'hello':<br><b>";
exec ("hello", $output, $result);
var_dump($output);
print "<br>$result";
print "<br></b>end hello.";
print "<br><hr><br>";
print "<br>executing 'dir':<br><b>";
exec("dir", $o...
In my TFSBuild.proj I have the following Exec commands:
<Target Name="AfterCompile">
<Exec Command="@echo Program.cs(12,20): warning CS1002: ; missing"/>
<Exec Command="@echo Program.cs(13,20): Warning CS1003: ;; missing"/>
<Exec Command="@echo Program.cs(14,20): error CS1004: ;;; missing"/>
</Target>
The TFS build fails, ...
I have an application that loads a vast amount of data from twitter. We have began to notice some performance issues and so I setup SQL Profiler for the applications database. I have noticed the following SQL statement are being executed but do not appear anywhere in my code. Therefore, I am assuming that either SQL Server 2005 or ColdFu...
I'm trying to use rdebug with emacs and cygwin and I'm running into trouble. Whenever I do a M-x rdebug and give it the appropriate script to run, it stops with the error
"apply: Spawning child process: exec format error"
From some googling, it seems like this could happen if I'm trying to launch a cygwin executable via the windows ...
I have two subsequent exec commands. The first executes without issue the second however is throwing an error:
exec('/usr/bin/pdftk A='. trim($original) .' cat A1 output '. trim($onepage), $output, $error);
var_dump($output); var_dump($error);
exec('/usr/bin/pdftk '. trim($onepage) .' background watermark.pdf output '. trim($modified)...
I'm trying to run a Python script using exec() from within PHP. My command works fine when I run it directly using a cmd window, but it produces an error when I run it from exec() in PHP.
My Python script uses NTLK to find proper nouns. Example command:
"C:\Python25\python.exe" "C:\wamp\projects\python\trunk\tests\find_proper_nouns.py"...
I need to execute a unix command with different args in a loop. Now I wonder if I should use execvp(), passing in the cmd and the args, or use system, building a string consisting of cmd + args?
...
New Ant 1.8.0 (release Feb 1) introduces some cool features, so I tried my build/deployment scripts with new Ant.
I was surprised that execution time becomes in 10-30 times slower for some targets! Below simple example with Exec task, although I got performance problems with other task types too.
<target name="create_backup_impl" if...
In the execve() man page it is said that argv is a list of string arguments which is ended by a null pointer. But what is the NP for? I mean, the number of arguments is stored in argc, so what's the point of the null pointer?
...
I want the process running to exec. When the command exec runs finishes, I want the process that called the process calling exec to recieve as a return value the value that the function called by exec returned. How is this possible?
I'm sorry. I understand the process is a bit confusing.
So let me give an example I am in a bash script...
This is a most singular problem, with many interdisciplinary ramifications.
It focuses on this piece of code (file name mainpp.c):
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
int status;
if (fork())
{
FILE *f=fopen("/tmp/gcc-trace","a");
fprintf(f,"----------------------------------...
I wrote a signal handler for a process, and fork() after that, the signal handler will be applied to both parent and child processes. If I replace the child process with "exec", the signal handler is no more.
I know this happens because "exec" call will overwrite the child process address space with it's own.
I just want to know if ther...
Hi, I found this code from http://kevin.vanzonneveld.net/techblog/article/convert_anything_to_tree_structures_in_php/, but I couldn't get it work. I am working on WIndow environment and the path I use is /sellable where the sellable is the folder inside the working folder :
if(exec("find /etc/php5", $files)){
// the $files array no...
Hi, guys. I have a question about the stack size of a process on Linux. Is this stack size determined at linkage time and is coded in the ELF file? I wrote a program which print its stack size by pthread_attr_getstacksize(&attr, &stacksize);. And if I run this program directly from shell, it gives a value of about 10MB. But when I exec i...
I've got a site that requires manual creation of the database tables on install. At the moment they are saved (along with any initial data) in a collection of .sql files.
I've tried to auto-create using exec() with CLI MySQL and while it works on a few platforms it's fairly flakey and I don't really like doing it this way, plus it is h...
I looked at a number of existing questions about NameError exceptions when scripts are run with exec statements or execfile() in Python, but haven't found a good explanation yet of the following behavior.
I want to make a simple game that creates script objects at runtime with execfile(). Below are 4 modules that demonstrate the proble...
I do not understand what environment a eval or exec statement executes in. You can pass both global and local scopes to them but I don't quite understand what this means. Does python create an anonymous module for them, and if that is the case how do the global and local scope differ?
Does it run it like it was an anonymous function? ...
I'm sorry if the title is quite confusing but I am wondering if it's possible to get the stdout of an app that is piped into another app in java.
Here's the commandline.
sox -d -t wav - | lame - test.mp3
If this is executed in bash, this is the output.
Input File : '/dev/dsp' (ossdsp)
Channels : 2
Sample Rate : 48000
Pr...
Hello:
On linux, it is said that rlimit of a process is kept intact after either fork or exec. But I lose my RLIMIT_STACK in the child either after fork or after exec. Would someone please give some explain?
Here is some descriptive output of my program.
//The parent has an RLIMIT_STACK like this
RLIMIT_STACK, soft - 10485760, hard - ...
I'm trying to process data obtained from a run of diff to an instance of GNU grep in a java program. I've managed to get the output of diff using the Process object's outputStream, but I'm currently having programs sending this data to the standard input of grep (through another Process object created in Java). Running Grep with the inpu...