bang commands from perl - part 2 Thread last updated on 2004-05-09 19:59:33

Posted by member 151064 on 2004-05-08 19:12:54

I am making a perl/Tk desktop switcher that works by making !bang calls to ckvwm via the "system" command in perl. The desktop switches fine but then the system hangs untill I kill the perl process.

If I use the "exec" command it works fine. I guess the "system" command is waiting for litestep to return a status code and never gets one.

As a work around I made a batch file that does 2 things:
1. takes argument and switches to that desk number.
2. calls my program.

So my program uses "exec" to call the batch program to call litestep to call my program. Silly, I know and makes my program dissapear and reapear. Very amature.

Does anyone know a way around this?

Posted by member 151064 on 2004-05-09 19:59:33 link

Ha! Found it. Normally you would do a fork and exec from the child process but Tk does not like that. So I made a one line perl script that calls exec and presto! everything works the way I needed it to.