Hi, The problem is that pclose returns 0 in either case. I've tried it with fork + execl too and there it's the same. The result of execl is a negative number whether wireshark has started correctly or not. The return code of pclose or execl does not reflect whether wireshark was able to start correctly (with valid parameters).
Kitty -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jaap Keuter Sent: dinsdag 10 oktober 2006 13:56 To: Community support list for Wireshark Subject: Re: [Wireshark-users] Getting response values from wireshark ?? Hi, Wireshark has no option to suppress it's output. You could play with the way you popen(), but I'm not familiar what Solaris provides in this respect. pclose() should provide you with the exit status of Wireshark which is 0 if all is well, !0 otherwise. Thanx, Jaap On Tue, 10 Oct 2006, Janssens, Kitty wrote: > Hello, > > I'm working with wireshark 0.99.3a on Solaris 5.9. > I start wireshark from a C++ program (with popen() and pclose()) and > tell it to read from a named pipe (option -i) and specifying some other > parameters (-n -k -l ...). > > Now, when some of the 'startup' parameters are invalid, wireshark > doesn't start, but prints its man page and makes my program 'hang'. > Is there any way to catch a return code or something like that? > Or a way to stop wireshark from showing the man page when it can't start > with the specified parameters ? > > > Thanks ! > > Kitty > > > > _______________________________________________ Wireshark-users mailing list [email protected] http://www.wireshark.org/mailman/listinfo/wireshark-users _______________________________________________ Wireshark-users mailing list [email protected] http://www.wireshark.org/mailman/listinfo/wireshark-users
