help: shell, or running external program

General FreeBASIC programming questions.
Nitrous2006
Posts: 4
Joined: Dec 09, 2010 16:50

help: shell, or running external program

Postby Nitrous2006 » Jan 09, 2011 5:31

i'm trying to run an external program, i'm using linux FB
i'm making an easy WEP cracking tool that uses aircrack, if you've
ever used it you know it needs to run to collect packets sent by the
target, but i need it to also switch back to my program and execute more commands WHILE STILL RUNNING other commands....

SHELL transfers control, RUN does also, and so does EXEC...

...so is there a command that allows external programs running parallel to each other while in a terminal? this is a terminal(text mode program)....

please help!!!
j_milton
Posts: 458
Joined: Feb 11, 2010 17:35

Postby j_milton » Jan 09, 2011 15:36

in windows you can use shell with the "start" command to do this, but I don't know of a linux equivalent, but you could try "&", not sure...
shell ("./some_executable &")
Nitrous2006
Posts: 4
Joined: Dec 09, 2010 16:50

Postby Nitrous2006 » Jan 10, 2011 1:40

i've looked everywhere... apparently there is no way of executing a command and returning to my program. so i'm going to make my program write a script from the data gathered by the user, and then shell a new terminal that executes my script, returning back to my program, while having the newly created one still running nice and neatly in a seperate window.
AGS
Posts: 1284
Joined: Sep 25, 2007 0:26
Location: the Netherlands

Postby AGS » Jan 10, 2011 23:15

Nitrous2006 wrote:i've looked everywhere... apparently there is no way of executing a command and returning to my program. so i'm going to make my program write a script from the data gathered by the user, and then shell a new terminal that executes my script, returning back to my program, while having the newly created one still running nice and neatly in a seperate window.


There is spawnl, spawnle, spawnlpe etc.... They're in PATH_TO_FBC/inc/crt/win32/process.bi. On Linux it will be somewhere else (/inc/crt/linux/process.bi?) but the content of the file will be the same.

Specify P_NOWAIT to make the spawned program start without blocking the application that called spawn.

http://qnxcs.unomaha.edu/help/product/n ... pawnl.html

Return to “General”

Who is online

Users browsing this forum: No registered users and 1 guest