Problems with a thread that records dvd on suse linux
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Wednesday, August 4, 2004 05:49 AM

PLEASE HELP I am using SuSE linux, and I record dvd+/- RW with the program growisofs. By command line on the linux shell, growisofs records normally, but when I try to use the same line cone that I use in the shell in a java thread, it never stops recording, I mean, it records all data, but it apparently does not close the dvd session, for the grenn light on the drive never stops blinking, and I have to stop the proccess manually, because it never releases the dvd drive. I use the thread in a large program, but for debugging this I have made a simple program, whose error is the same. the code is: String s = "/usr/local/bin/growisofs -speed   More>>
PLEASE HELP


I am using SuSE linux, and I record dvd+/- RW with the program growisofs.






By command line on the linux shell, growisofs records normally, but when I try to use the same line cone that I use in the shell in a java thread, it never stops recording, I mean, it records all data, but it apparently does not close the dvd session, for the grenn light on the drive never stops blinking, and I have to stop the proccess manually, because it never releases the dvd drive.






I use the thread in a large program, but for debugging this I have made a simple program, whose error is the same.







the code is:




			
String s = "/usr/local/bin/growisofs -speed=1 -M /dev/dvdram -V MIS27 -A growisofs -P MedImServer " +
" -p MedImServer -sysid Linux -J -R -l -relaxed-filenames -allow-lowercase -allow-multidot /windows/C/online";

Process p;

try {

p = Runtime.getRuntime().exec(s);

p.waitFor();
}
catch (IOException ex) {
JOptionPane.showMessageDialog(null,"erro no runtime");
System.exit(0);

}

catch (InterruptedException ex1) {

JOptionPane.showMessageDialog(null,"erro no waitfor");
System.exit(0);
}






with JBuilder 9 debug, I realized that it freezes at the moment of "p.waitFor()".






Please, I'm desperate!!!!






Any help WILL BE appreciated!




Thanks


Tiago    <<Less

Re: Problems with a thread that records dvd on suse linux

Posted By:   Simon_Ablett  
Posted On:   Wednesday, August 4, 2004 09:18 AM

The main thread of your Java application is waiting for the external process to end. The presumption therefore is that the call to 'growisofs' never returns. Does it expect any kind of interaction from the user (for example, does it ask if you want to 'start recording', 'eject the CD' etc.)?

Regards.
About | Sitemap | Contact