It is currently Sat, 17 Apr 2021 17:55:04 GMT



 
Author Message
 Question about system() call malfunctioning (Was: Question: system() from C++ CGI to Perl with Kernel 2.2.16)
Hello all,

I've done some more testing (see MORE INFO Re: Question: system() from
C++ CGI to Perl with Kernel 2.2.1) and it seems like the syscall
(system()) from my C++ CGI to my Perl module is not working.  To sum up,
the C++ CGI is working as expected, but the output from the Perl module
called by system() is not presenting back to the user.  I'm getting a
large return value from the syscall (33,000+, depending on the query
appended to the string/command).  I suspect that the Perl script is
actually being run, because malfunctioning syscalls from that are
logging to /var/log/httpd/error_log.  I resolved those and they
disappeared from the logs.  However, no other messages are being logged.

My research into what this means leads me to conclude that the program
runs the syscall, but for whatever reason it returns an error.  Could
this be because the output is going somewhere other than STDOUT?

Using strace wasn't very useful to me because I can't run the C++ CGI
from the command line.  (It's programmed to parse only GET or POST
method requests.) I did use strace on the executable file without the
arguments just to see what I
would get, and found no differences between the version that works and
the one that does not.

Any ideas on where to go from here would be appreciated.

--
Lisa Wilcox
SAGE Systems Developer
SAGE Project:   http://www.**-**.com/
Woodruff Library/Emory University
Email: lwil...@emory.edu
Phone: 404-727-0961



 Mon, 06 Jan 2003 03:00:00 GMT   
 Question about system() call malfunctioning (Was: Question: system() from C++ CGI to Perl with Kernel 2.2.16)
Thanks.  We tried popen().  Interestingly, when run from a script at the command
line (not the same script, but something we threw together fast just to see if it
would work), it worked fine.  When run from the CGI, however, we could not
retrieve the output.

--
Lisa Wilcox
SAGE Systems Developer
SAGE Project:  http://sage.library.emory.edu/
Woodruff Library/Emory University
Email: lwil...@emory.edu
Phone: 404-727-0961



 Mon, 06 Jan 2003 03:00:00 GMT   
 Question about system() call malfunctioning (Was: Question: system() from C++ CGI to Perl with Kernel 2.2.16)

You should have used strace -f -o tracefile on the httpd.

73, Mario
--
Mario Klebsch                                           ma...@klebsch.de
PGP-Key available at http://www.klebsch.de/public.key
Fingerprint DSS: EE7C DBCC D9C8 5DC1 D4DB  1483 30CE 9FB2 A047 9CE0
 Diffie-Hellman: D447 4ED6 8A10 2C65 C5E5  8B98 9464 53FF 9382 F518



 Mon, 06 Jan 2003 03:00:00 GMT   
 
   [ 3 post ] 

Similar Threads

1. How to use open system call in a new system call

2. How I could add a new system call to linux or modify a system calls

3. question about mount() system call

4. System call question

5. question on recv() system call

6. POSIX system call interface and POSIX standard: questions

7. Hyperion's quest [1]: introduction and some questions about exceptions in system calls

8. newbe system call question

9. Question about system call...

10. questions about system calls


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software