Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Am3822

macrumors 6502
Original poster
Aug 16, 2006
424
0
Groningen, The Netherlands
Hi folks,

I'm currently running Terminal.app with several open windows (invoked using command+N) and I've noticed that if I launch a background application in one of them (i.e., running something like matlab &), the application would terminate if I close that particular window (even though Terminal.app would still be running).

Is there a way to get around it? Before 10.5 improved the integration of X11.app and Terminal.app, I mainly used X11.app's xterm, and there I had no such problem.
 
You could try "nohup"ing it, this works in Linux:

nohup matlab &

nohup

EDIT: Just tried this with a simple command, and the warning message says it will stop the command, but I closed anyway...... and the command is still running when I check.... so looks good.
 
Thanks for the information. It does look risky, though, given that in the past I've had to kill matlab on more than one occasion. Will I be able to terminate the process with 'kill -15 / -9' ?
 
Thanks for the information. It does look risky, though, given that in the past I've had to kill matlab on more than one occasion. Will I be able to terminate the process with 'kill -15 / -9' ?

Sorry for the delay! Yeah you can still kill the process using kill -9 PID

nohup just ignores hang-up signals (which you give on exit). Kill commands will still work.
 
And how to setup matlab to be run from command line?

Hi,

I also want to run matlab with the no hangup thing.
Problem is, calling matlab from the command line is not working...

I guess I have to create a shortcut to some executable file.
Does anyone know what it is?

If so, does that support running matlab in command line mode (matlab -nojvm) ?

Any help appreciated.

Best,

gv
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.