* Re: Signaling dosemu application to kill itself from Linux @ 2005-04-06 16:06 Stas Sergeev 2005-04-06 22:16 ` tonyb 0 siblings, 1 reply; 18+ messages in thread From: Stas Sergeev @ 2005-04-06 16:06 UTC (permalink / raw) To: linux-msdos Hello. tonyb@thekrnl.sysdev.org wrote: > The problem is that if dosemu is killed from Linux (crond), and > the dosemu console is in focus, the screen/kbd could cause Linux > to reboot No! It can't! If it does this, then it is a misconfiguration/ bug/outdated kernel/outdated dosemu/ dosemu with root privs/ or whatever, but not the supposed behaviour. With the sane setup such a things simply cannot happen. Please explain your problem in *much* more details. > because they were left in a bad state by a dos tsr. You can extend the dosemu startup script, or start it from another script, which, after dosemu exits, will restore the keyboard and the console state. But no, this have nothing to do with rebootes etc, so please explain your problem in details. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Signaling dosemu application to kill itself from Linux 2005-04-06 16:06 Signaling dosemu application to kill itself from Linux Stas Sergeev @ 2005-04-06 22:16 ` tonyb 2005-04-07 0:47 ` Gene Heskett 0 siblings, 1 reply; 18+ messages in thread From: tonyb @ 2005-04-06 22:16 UTC (permalink / raw) To: linux-msdos On Wed, 06 Apr 2005 20:06:32 +0400 Stas Sergeev <stsp@aknet.ru> wrote: > Hello. > > tonyb@thekrnl.sysdev.org wrote: > > The problem is that if dosemu is killed from Linux (crond), and > > the dosemu console is in focus, the screen/kbd could cause Linux > > to reboot > No! It can't! If it does this, > then it is a misconfiguration/ > bug/outdated kernel/outdated dosemu/ > dosemu with root privs/ or whatever, > but not the supposed behaviour. > With the sane setup such a things > simply cannot happen. Please explain > your problem in *much* more details. > > > because they were left in a bad state by a dos tsr. > You can extend the dosemu startup > script, or start it from another > script, which, after dosemu exits, > will restore the keyboard and the > console state. But no, this have > nothing to do with rebootes etc, > so please explain your problem in > details. > > - > To unsubscribe from this list: send the line "unsubscribe > linux-msdos" in the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Basically, now that I have you on this, I am going to do some more tests. The kernel version: 2.4.27 w/libc2.3.2 The shell : bash v2.05.0(1) The Dosemu version: 1.3.1 + time patch user, currently root, but I believe also non-root going to retest that. from shell, run a /bin/sh script that runs dosemu in a while []; do .... done loop from crond root run a line that touches a 'restart' file in C:/ and kills -TERM dosemu.bin, exiting to the original shell while [] loop, the screen is ok (the shell's) but the kbd is in echo strange characters mode and not passing to the original shell. dosemu is not restarted, no way to do a ps to check what is running. however, if I switch to a 2nd tty and run top, I see dosemu.bin being restarted every 10min (for this test) and all is good! more later Thanks TonyB -- __ __ _ I N C. http://www.sysdev.org / __|\\// __|| \ __ __ / tonyb@sysdev.org \__ \ \/\__ \||)|/ O_)\/ / \/ System Tools / Utilities |___/ || ___/|_ /\___|\_/ WIntel / Linux Device Drivers ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Signaling dosemu application to kill itself from Linux 2005-04-06 22:16 ` tonyb @ 2005-04-07 0:47 ` Gene Heskett 0 siblings, 0 replies; 18+ messages in thread From: Gene Heskett @ 2005-04-07 0:47 UTC (permalink / raw) To: tonyb; +Cc: linux-msdos On Wednesday 06 April 2005 18:16, tonyb@thekrnl.sysdev.org wrote: [...] >Basically, now that I have you on this, I am going to do some more >tests. > >The kernel version: 2.4.27 w/libc2.3.2 >The shell : bash v2.05.0(1) >The Dosemu version: 1.3.1 + time patch Mmm, what is this time patch, and where can it be obtained? Thanks Tony. -- Cheers, Gene "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) 99.34% setiathome rank, not too shabby for a WV hillbilly Yahoo.com and AOL/TW attorneys please note, additions to the above message by Gene Heskett are: Copyright 2005 by Maurice Eugene Heskett, all rights reserved. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Signaling dosemu application to kill itself from Linux @ 2005-04-10 8:40 Stas Sergeev 0 siblings, 0 replies; 18+ messages in thread From: Stas Sergeev @ 2005-04-10 8:40 UTC (permalink / raw) To: linux-msdos Hello. tonyb@thekrnl.sysdev.org wrote: > handles the I/O to 378h and 3f8h. Since > he was not using INT 14h, I didnt realize > that your dosemu abstraction (emulation) > would filter both port and IRQ I/O! Thats actually a common problem here. People assume that something doesn't work without even trying it (even after they were suggested to try), and the serial ports is a most frequent casuality of such a self-delusion. > But when I was able to fire it up, the screen during > dosemu kill was NO LONGER HANGING Linux. And the restarts > occurred fine. Good that is now works. But it would be nice to understand where the problem was, so that we can fix it. Your config looks mostly safe, but there are still those dangerous things like the hardware ram and irqpassing (and I really think that the hardware_ram thing was not tested here for about something like 5 years or more, so it can easily be broken). It would be nice if you try the things as root again, but with the fresh dosemu.conf, the one with everything is commented out, and see whether it still hurts the linux box or not. If it works without the lookups/rebootes, then you can easily locate an option of dosemu.conf that made the problem for you. And it should be the latest CVS code of dosemu to make the testing more valueable. > This might have also solved the PIT emulation > going crazy, but wont know for 3 or 4 weeks. This is very unlikely, but keep us informed. > The idea was > to reset dosemu every week, to avoid the problem. Quite pity that such a hacks are still needed. Apparently dosemu was never tested for such a long uptimes. >> >> if you need an LPT too, then that's >> >> a problem. > I knew that wasnt emulated from some posts. So how at the end you got the LPTs to work without a root? To the best of my knowledge, it is not possible right now, unless you implemented the missing emulation yourself. (I don't mean the printing-only mode, which is how the LPT emulation is implemented right now) > We are not using INT 1A OK, then please refresh my memory on what you actually use and I'll take another look at that code. > I would add code to the TSR > instead of having to do a dosemu kill and restart! Yes, that should work. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Signaling dosemu application to kill itself from Linux @ 2005-04-08 3:55 Stas Sergeev 2005-04-10 0:32 ` tonyb 0 siblings, 1 reply; 18+ messages in thread From: Stas Sergeev @ 2005-04-08 3:55 UTC (permalink / raw) To: linux-msdos Hello. tonyb@thekrnl.sysdev.org wrote: >> Why are you using the direct access >> to the serial ports? > Client requested it! No, client couldn't request you to use the direct access instead of an emulated one, cause that's silly. Emulated access works nearly as fast in the CVS code, there is no reason for using the direct access, at least not before you made sure the emulated access doesn't work for you properly. >> if you need an LPT too, then that's >> a problem. > Client requirement also Client couldn't request you to enable the direct access to an LPT either. The problem here is that dosemu still doesn't support an emulated access to the LPT ports, so you had no choice. This is something to change in the future. > but will test as non-root, > anyway. Problem is that I believe we already did... And that didn't fix the rebootes? Sorry, I have troubles beleiving into this. > So the PIT is goin crazy after about 3weeks of > running??? Looks like that. I can't try myself to tell for sure though. > If that is so, then why is the Linux > time correct We are talking about dosemu here, and of course I mean the PIT emulation of dosemu only. > while the dosemu one goes BAD, > since with the timemode patch, dosemu is reading > the linux time directly??? Because the timemode patch affects only an RTC, and not PIT. Unfortunately I think such an approach is not possible for PIT at all. Now looking into your report at SF, you claim that you use int1a/ah=2, so probably my guess about a PIT doesn't apply, as the timemode patch affects the int1a/ah=2 too. If you are using FreeDOS, you can try using MS-DOS instead. There are the reports where the time gets wrong with FreeDOS but not with MS/PC-DOS, which I haven't looked up yet. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Signaling dosemu application to kill itself from Linux 2005-04-08 3:55 Stas Sergeev @ 2005-04-10 0:32 ` tonyb 0 siblings, 0 replies; 18+ messages in thread From: tonyb @ 2005-04-10 0:32 UTC (permalink / raw) To: linux-msdos On Fri, 08 Apr 2005 07:55:46 +0400 Stas Sergeev <stsp@aknet.ru> wrote: > Hello. > > tonyb@thekrnl.sysdev.org wrote: > >> Why are you using the direct access > No, client couldn't request you > to use the direct access instead > of an emulated one, I guess my client has a TSR that installs its own services for the COM1/2 IRQs and then handles the I/O to 378h and 3f8h. Since he was not using INT 14h, I didnt realize that your dosemu abstraction (emulation) would filter both port and IRQ I/O! > > >> if you need an LPT too, then that's > >> a problem. I knew that wasnt emulated from some posts. > > but will test as non-root, > > anyway. Problem is that I believe we already did... No, we hadnt, they were all members of group root. So, I had to do a lot of changes to the embedded linux, It assumed only root access, so had to fix the permisions in /dev and change many scripts and permissions... But when I was able to fire it up, the screen during dosemu kill was NO LONGER HANGING Linux. And the restarts occurred fine. This might have also solved the PIT emulation going crazy, but wont know for 3 or 4 weeks. The idea was to reset dosemu every week, to avoid the problem. > Now looking into your report at SF, > you claim that you use int1a/ah=2, so > probably my guess about a PIT doesn't > apply, as the timemode patch affects > the int1a/ah=2 too. We are not using INT 1A, I just asked if I could use that to reset the dosemu clock back to the correct Linux clock when I detect that it goes bad. I would add code to the TSR instead of having to do a dosemu kill and restart! > If you are using FreeDOS, you can try > using MS-DOS instead. There are the > reports where the time gets wrong with > FreeDOS but not with MS/PC-DOS, which > I haven't looked up yet. I was using MSDOS 5.0 Thank you mucho, for your help and discussion. Great tech support. TonyB -- __ __ _ I N C. http://www.sysdev.org / __|\\// __|| \ __ __ / tonyb@sysdev.org \__ \ \/\__ \||)|/ O_)\/ / \/ System Tools / Utilities |___/ || ___/|_ /\___|\_/ WIntel / Linux Device Drivers ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Signaling dosemu application to kill itself from Linux @ 2005-04-07 17:59 Stas Sergeev 0 siblings, 0 replies; 18+ messages in thread From: Stas Sergeev @ 2005-04-07 17:59 UTC (permalink / raw) To: linux-msdos Hello. Andrew Brooks wrote: > Not disappeared at all, still lurking. But our patch was broken > up when applied to CVS and we haven't found the time yet to work > out which bits were applied, which changed and which left out :-( What's the problem with that exactly? I already pointed you the particular commits. Now you only have to set up the CVS tree before that commit and apply your patch to it. Then setup another tree, right after the commit was done. Diffing these two trees will immediately reveal what's missing. 10 minutes of work at most, I'd say. > Actually I've got a patch for the patch; you should change I haven't applied that part at all. It needs a further review with some kind of a bi-directional communication with the authors, which so far wasn't set up properly:) But sure enough I fixed other bugs of your patch in the parts that were applied. In case you are wondering: http://cvs.sourceforge.net/viewcvs.py/dosemu/dosemu/src/base/dev/misc/rtc.c?r1=1.6&r2=1.7&diff_format=u http://cvs.sourceforge.net/viewcvs.py/dosemu/dosemu/src/base/dev/misc/rtc.c?r1=1.5&r2=1.6&diff_format=u ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Signaling dosemu application to kill itself from Linux @ 2005-04-07 17:50 Stas Sergeev 2005-04-08 2:14 ` tonyb 0 siblings, 1 reply; 18+ messages in thread From: Stas Sergeev @ 2005-04-07 17:50 UTC (permalink / raw) To: linux-msdos Hello. tonyb@thekrnl.sysdev.org > Negatory on that, no raw kbd or strange stuff, > all vanilla... Yes, your config looks pretty save. Note: you don't need to uncomment the options unless you are going to change them. Why are you using the direct access to the serial ports? The emulated access of the CVS dosemu is nearly as fast as the real one. I'd like you to revoke the root privs from a dosemu process before the further experementations, but if you need an LPT too, then that's a problem. > Advantek i486 Cytrix tiny mobo. I do have > a serial port, can try logging on a getty > there. Yes, please do this and produce a stack trace with gdb when dosemu is hanging. Alternatively, send a SIGSEGV to dosemu when it is hanging, and it will dump a stack trace into a log. > just spinning. There is an assembly language > TSR that is running that I bet is holding > the dosemu thread active or hung. No DOS program should hold a dosemu when it gets a SIGTERM, or it is a bug. The stack trace can help. Also, how exactly are you killing it? SIGKILL can help too:) > Is there a way (INT 1Ah?) to force dosemu to reset its time to > Linux's, on request? The mentioned patch was just reading a linux time directly, so with the $_timemode="linux" you don't need to reset anything at all. I am sure however your problem is not related to RTC, it is a problem of the PIT most likely. The patch won't help. You'll have to dig a PIT code, which is just a big mess :( It boils down to the cputime.c at one point, but the parts of it are all around the sources. You'll certainly have fun tracking it. One thing to try is $_rdtsc=on/off (don't remember if I told you that already) ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Signaling dosemu application to kill itself from Linux 2005-04-07 17:50 Stas Sergeev @ 2005-04-08 2:14 ` tonyb 0 siblings, 0 replies; 18+ messages in thread From: tonyb @ 2005-04-08 2:14 UTC (permalink / raw) To: linux-msdos On Thu, 07 Apr 2005 21:50:26 +0400 Stas Sergeev <stsp@aknet.ru> wrote: > Why are you using the direct access > to the serial ports? Client requested it! > I'd like you to revoke the root > privs from a dosemu process before > the further experementations, but > if you need an LPT too, then that's > a problem. Client requirement also, but will test as non-root, anyway. Problem is that I believe we already did... > > Advantek i486 Cytrix tiny mobo. I do have > > a serial port, can try logging on a getty > > there. > Yes, please do this and produce a > stack trace with gdb when dosemu is > hanging. > Alternatively, send a SIGSEGV to > dosemu when it is hanging, and it > will dump a stack trace into a log. Will do ASAP. > The mentioned patch was just reading > a linux time directly, so with the > $_timemode="linux" you don't need to > reset anything at all. So the PIT is goin crazy after about 3weeks of running??? If that is so, then why is the Linux time correct, while the dosemu one goes BAD, since with the timemode patch, dosemu is reading the linux time directly??? Next time that happens, I will have the customer exit the application and from DOS prompt do a date command, see what it shows? > One thing to try is $_rdtsc=on/off > (don't remember if I told you that > already) You probably did, to my boss at ToyeCorp. He got me talking to you directly now, hehe 8) Tony -- __ __ _ I N C. http://www.sysdev.org / __|\\// __|| \ __ __ / tonyb@sysdev.org \__ \ \/\__ \||)|/ O_)\/ / \/ System Tools / Utilities |___/ || ___/|_ /\___|\_/ WIntel / Linux Device Drivers ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Signaling dosemu application to kill itself from Linux
@ 2005-04-07 3:45 Stas Sergeev
2005-04-07 9:07 ` Andrew Brooks
2005-04-07 16:06 ` Gene Heskett
0 siblings, 2 replies; 18+ messages in thread
From: Stas Sergeev @ 2005-04-07 3:45 UTC (permalink / raw)
To: linux-msdos
Hello.
Gene Heskett wrote:
> Mmm, what is this time patch, and where can it be obtained?
Here:
http://sourceforge.net/tracker/index.php?func=detail&aid=1034800&group_id=49784&atid=457449
But I won't count too much on it,
as the guys who submitted it,
disappeared.
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: Signaling dosemu application to kill itself from Linux 2005-04-07 3:45 Stas Sergeev @ 2005-04-07 9:07 ` Andrew Brooks 2005-04-07 16:23 ` tonyb 2005-04-07 16:06 ` Gene Heskett 1 sibling, 1 reply; 18+ messages in thread From: Andrew Brooks @ 2005-04-07 9:07 UTC (permalink / raw) To: linux-msdos Stas Sergeev wrote: > > Gene Heskett wrote: > > Mmm, what is this time patch, and where can it be obtained? > But I won't count too much on it, as the guys who submitted it, > disappeared. Not disappeared at all, still lurking. But our patch was broken up when applied to CVS and we haven't found the time yet to work out which bits were applied, which changed and which left out :-( Actually I've got a patch for the patch; you should change ds70 = tm->tm_yday + (year-1970)*365L + (year-1970)/4; to ds70 = tm->tm_yday + (year-1970)*365L + (year-1969)/4; Andrew ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Signaling dosemu application to kill itself from Linux 2005-04-07 9:07 ` Andrew Brooks @ 2005-04-07 16:23 ` tonyb 2005-04-07 17:25 ` Gene Heskett 0 siblings, 1 reply; 18+ messages in thread From: tonyb @ 2005-04-07 16:23 UTC (permalink / raw) To: linux-msdos On Thu, 07 Apr 2005 10:07:26 +0100 Andrew Brooks <arb@sat.dundee.ac.uk> wrote: > Stas Sergeev wrote: > > > > Gene Heskett wrote: > > > Mmm, what is this time patch, and where can it be obtained? > > > But I won't count too much on it, as the guys who submitted it, > > disappeared. > > Not disappeared at all, still lurking. But our patch was broken > up when applied to CVS and we haven't found the time yet to work We applied your patch in the hope it would fix a date/time corruption that happens after about 3wks of uptime. But it didn't. That is why we are trying to force a weekly restart of dosemu, by killing it from crond. So that it syncs with the Linux clock again. Is there a way (INT 1Ah?) to force dosemu to reset its time to Linux's, on request? Looking at the dosemu code, it only does that once, at dosemu start... TonyB -- __ __ _ I N C. http://www.sysdev.org / __|\\// __|| \ __ __ / tonyb@sysdev.org \__ \ \/\__ \||)|/ O_)\/ / \/ System Tools / Utilities |___/ || ___/|_ /\___|\_/ WIntel / Linux Device Drivers ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Signaling dosemu application to kill itself from Linux 2005-04-07 16:23 ` tonyb @ 2005-04-07 17:25 ` Gene Heskett 0 siblings, 0 replies; 18+ messages in thread From: Gene Heskett @ 2005-04-07 17:25 UTC (permalink / raw) To: tonyb, k_swisher; +Cc: linux-msdos On Thursday 07 April 2005 12:23, tonyb@thekrnl.sysdev.org wrote: >On Thu, 07 Apr 2005 10:07:26 +0100 > >Andrew Brooks <arb@sat.dundee.ac.uk> wrote: >> Stas Sergeev wrote: >> > Gene Heskett wrote: >> > > Mmm, what is this time patch, and where can it be obtained? >> > >> > But I won't count too much on it, as the guys who submitted it, >> > disappeared. >> >> Not disappeared at all, still lurking. But our patch was broken >> up when applied to CVS and we haven't found the time yet to work > >We applied your patch in the hope it would fix a date/time > corruption that happens after about 3wks of uptime. But it didn't. >That is why we are trying to force a weekly restart of dosemu, by >killing it from crond. So that it syncs with the Linux clock again. > >Is there a way (INT 1Ah?) to force dosemu to reset its time to >Linux's, on request? Looking at the dosemu code, it only does that >once, at dosemu start... > >TonyB Oh oh, this can and will be a problem where the scaling app is used as I doubt the boxes will be shut down at night. So I'm watching this thread carefully for the difinitive answer. -- Cheers, Gene "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) 99.34% setiathome rank, not too shabby for a WV hillbilly Yahoo.com and AOL/TW attorneys please note, additions to the above message by Gene Heskett are: Copyright 2005 by Maurice Eugene Heskett, all rights reserved. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Signaling dosemu application to kill itself from Linux 2005-04-07 3:45 Stas Sergeev 2005-04-07 9:07 ` Andrew Brooks @ 2005-04-07 16:06 ` Gene Heskett 2005-04-07 16:35 ` Andrew Brooks 1 sibling, 1 reply; 18+ messages in thread From: Gene Heskett @ 2005-04-07 16:06 UTC (permalink / raw) To: Stas Sergeev; +Cc: linux-msdos, k_swisher On Wednesday 06 April 2005 23:45, Stas Sergeev wrote: >Hello. > >Gene Heskett wrote: >> Mmm, what is this time patch, and where can it be obtained? > >Here: >http://sourceforge.net/tracker/index.php?func=detail&aid=1034800&gro >up_id=49784&atid=457449 But I won't count too much on it, >as the guys who submitted it, >disappeared. Hummm, scratching thinning hair here. Then maybe the better question is: what bug does it address so that we may ascertain if we need it or not? And, is it against 1.3.1? -- Cheers, Gene "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) 99.34% setiathome rank, not too shabby for a WV hillbilly Yahoo.com and AOL/TW attorneys please note, additions to the above message by Gene Heskett are: Copyright 2005 by Maurice Eugene Heskett, all rights reserved. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Signaling dosemu application to kill itself from Linux 2005-04-07 16:06 ` Gene Heskett @ 2005-04-07 16:35 ` Andrew Brooks 0 siblings, 0 replies; 18+ messages in thread From: Andrew Brooks @ 2005-04-07 16:35 UTC (permalink / raw) To: linux-msdos Gene Heskett wrote: > > Then maybe the better question is: what bug does it address so that we > may ascertain if we need it or not? And, is it against 1.3.1? The patch was originally against 1.2.0 or 1.2.1 (I forget which). It was not to fix a "bug" as such, rather that DOS time drifts in respect to Linux/real time so the patch simply reads Linux time when a program asks for DOS time. The web page describes the gory details: http://sourceforge.net/tracker/index.php?func=detail&aid=1034800&group_id=49784&atid=457449 tonyb@thekrnl.sysdev.org wrote: > We applied your patch in the hope it would fix a date/time corruption > that happens after about 3wks of uptime. We never found a "corruption", just a slow drift. To me "corruption" means badly/randomly wrong and that would suggest a different cause. Andrew ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Signaling dosemu application to kill itself from Linux @ 2005-04-07 3:38 Stas Sergeev 2005-04-07 6:12 ` tonyb 0 siblings, 1 reply; 18+ messages in thread From: Stas Sergeev @ 2005-04-07 3:38 UTC (permalink / raw) To: linux-msdos Hello. tonyb@thekrnl.sysdev.org wrote: > the screen is ok (the shell's) but the kbd is > in echo strange characters mode and not passing to the original > shell. "strange character mode" is probably the "raw" mode. You probably set $_rawkeyboard=(1) in your dosemu.conf. I suspect you also did some other unsafe changes in dosemu.conf, which, only coupled with the root privs, causes a reboot. (without the root privs the reboot is not possible by any means) To get out of the "raw" mode you can use either the kbd_mode command (which you have to put in your script), or the Alt-PrtSc-r keycombo. > dosemu is not restarted That's strange. I think this means that it is not really killed, and the process is still spinning. You can ssh to your PC and see what's going on in ps. > however, if I switch to a 2nd tty and run top, I see dosemu.bin > being restarted every 10min (for this test) and all is good! You can also try xdosemu (if possible) where all the like problems do not exist. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Signaling dosemu application to kill itself from Linux 2005-04-07 3:38 Stas Sergeev @ 2005-04-07 6:12 ` tonyb 0 siblings, 0 replies; 18+ messages in thread From: tonyb @ 2005-04-07 6:12 UTC (permalink / raw) To: linux-msdos On Thu, 07 Apr 2005 07:38:57 +0400 Stas Sergeev <stsp@aknet.ru> wrote: > "strange character mode" is probably > the "raw" mode. You probably set > $_rawkeyboard=(1) in your dosemu.conf. > I suspect you also did some other > unsafe changes in dosemu.conf, Negatory on that, no raw kbd or strange stuff, all vanilla... > > dosemu is not restarted > That's strange. I think this means that > it is not really killed, and the process > is still spinning. You can ssh to your > PC and see what's going on in ps. This is an embedded system running on an Advantek i486 Cytrix tiny mobo. I do have a serial port, can try logging on a getty there. I do believe that dosemu has not exit to its parent bash script 'while loop' and is just spinning. There is an assembly language TSR that is running that I bet is holding the dosemu thread active or hung. /etc/dosemu.conf (no overides in ~/.dosemurc) ----------------------------------------------------------- #################################################################### ########### # This file is the system-wide dosemu.conf or the per-user # ~/.dosemurc, included by global.conf or dosemu.bin. # # ./doc/README.txt (chapter 2.) contains a description of the syntax # and the usage of dosemu.conf and .dosemurc. # # The commented-out values are defaults, here for documentation # purposes only. Options marked [priv] cannot be changed in # ~/.dosemurc. # # (optional) access rights are defined in # # /etc/dosemu/dosemu.users or /etc/dosemu.users # #################################################################### ########### # Notes for editing this file: # # In $_xxx = (n) n is a numerical or boolean value # = = # In $_zzz = "s" s is a string # # Please note that all options are commented out by default! # Remove the # in front of the $ to change an option. #################################################################### ############ CPU settings: define the CPU features to DOSEMU. # CPU shown to DOS, valid values: "80[345]86" # or "emulated" for non-native CPU (386 in this case) Default: 80386 $_cpu = "80486" # if possible use Pentium cycle counter. Default: off $_rdtsc = (on) # CPU speed, used in conjunction with the TSC # Default 0 = calibrated by dosemu, else given (e.g.166.666) $_cpuspeed = (0) # emulated FPU, (off) or (on), default = (on) $_mathco = (on) # 0 = all CPU power to DOSEMU; default = 1 = nicest, then higher:more # CPU power $_hogthreshold = (0) #################################################################### ############ Disk and file system settings # List of hdimages or boot directories under # ~/.dosemu, the system config directory (/etc/dosemu by default), or # syshdimagedir (/var/lib/dosemu by default) assigned in this order # such as "hdimage_c directory_d hdimage_e" # Absolute pathnames are also allowed. # If the name begins with '/dev/', then partion access is done # instead of virtual hdimage such as "/dev/hda1" or "/dev/hda1:ro" # for readonly Currently mounted devices and swap are refused. # Hdimages and devices may be mixed such as "hdimage_c /dev/hda1 # /dev/hda3:ro" Note: 'wholedisk' is _not_ supported. Default: # "drives/*" $_hdimage = "/dosc /" # if you want to boot from a virtual floppy: # file name of the floppy image under DOSEMU_LIB_DIR # e.g. "floppyimage" disables $_hdimage # "floppyimage +hd" does _not_ disable $_hdimage. Default: "" $_vbootfloppy = "" # floppy drive types: "threeinch" or "fiveinch" or "atapi" or empty, # if non-existant. Optionally the device may be appended such as # "threeinch:/dev/fd0". Default: "threeinch" for A:, "" for B: $_floppy_a = "threeinch" $_floppy_b = "" # list of generic SCSI devices to make available for the builtin aspi # driver(format of an entry is 'device:type:mappedtarget' such as # "sg2:WORM sg3:Sequential-Access:6 sg4:CD-ROM" or # "sg2:4 sg3:1:6 sg4:5" (which are equal). Default: "" $_aspi = "" # whether to lock the full file on lredired drives for file locking # requests or just one byte # $_full_file_locks = (off) # config.sys -> config.XXX; default="" or 3 char., $_emusys = "" # system.ini -> system.XXX; default="" or 3 char., (for Windows # 3.x) $_emuini = "" #################################################################### ############ Memory settings # conventional DOS memory size, in Kbyte, <= 768. Default = 640 $_dosmem = (640) # XMS (extended memory) size in Kbyte; default: 8192. $_xms = (8192) # EMS (expanded memory) size in Kbyte; default: 2048. $_ems = (2048) # DOS segment where the EMS frame is put. Default = 0xe000. $_ems_frame = (0xe000) # DPMI size in Kbyte; default: 0x5000 $_dpmi = (0x5000) # preferred mapping driver, one of: auto, mapself, mapfile, mapshm # Default: ""="auto" # $_mapping= "" #################################################################### ############ Debug settings # debug switches; same format as -D commandline option, default: # ""="-a+cw".(but without the -D in front), normally written to # ~/.dosemu/boot.log $_debug = "-a+cw" #################################################################### ############ Dosemu-specific hacks # set this to some positive value (eg. Default: 10) # if you want to play Doom or Duke3D with sound. # $_cli_timeout = (10) # try setting this to some lower positive value (eg. 5; default: 50) # if you get problems with some DOS program # freezing after some time. $_pic_watchdog = (5) # list of temporary hacks, see release notes in the file ChangeLog. # e.g "0:1 2:0", which means to set feature_0 to 1 and feature_2 to # 0. Default: "" # $_features= "" #################################################################### ############ Terminal related settings # Global code page and character set selection. # default: "" == automatic, else: ibm, latin, latin1, latin2, koi8r $_term_char_set = "ibm" # Character set used externally to dosemu # Default: "" == use $_term_char_set one of else: # "cp437", "cp737", "cp773", "cp775", "cp850", "cp852", "cp857", # "cp860","cp861", "cp862", "cp863", "cp864", "cp865", "cp866", # "cp869", "cp874","cp895", "cp1125", "cp1251", "bg-mik" # "iso8859-1", "iso8859-2", "iso8859-3", "iso8859-4", "iso8859-5", # "iso8859-6","iso8859-7", "iso8859-8", "iso8859_9", "iso8859-14", # "iso8859-15", "koi8-r""koi8-u", "koi8-ru" # $_external_char_set = "" # Character set used by dos programs # Default: "" == use $_term_char_set one of else: # "cp437", "cp737", "cp773", "cp775", "cp850", "cp852", "cp857", # "cp860","cp861", "cp862", "cp863", "cp864", "cp865", "cp866", # "cp869", "cp874","cp895", "cp1125", "cp1251", "bg-mik" # $_internal_char_set = "" # terminal with color support. Default: (on) $_term_color = (on) # time between refreshes (units: 20 == 1 second). Default: 4 $_term_updfreq = (4) # xterm, putty and compatibles window title. Default: %s - DOSEMU # where %s is the DOS program's name. Use "" to not change the title # $_xterm_title = "%s - DOSEMU" # Video adapter style used: one of: vga, ega, mda, mga, cga, none # Default: "vga"; none=dumb terminal mode. $_video = "vga" #################################################################### ############ Keyboard related settings # Keyboard layout: default: 'auto' (which tries to generate the table # from the current Linux console settings) # or one of: finnish(-latin1), de(-latin1), be, it, us, uk, # dk(-latin1), keyb-no, no-latin1, dvorak, pl, po, sg(-latin1), # fr(-latin1), sf(-latin1), es(-latin1), sw, hu(-latin2), hu-cwi, # keyb-user, hr-cp852, hr-latin2, cz-qwerty, cz-qwertz, ru, tr. $_layout = "auto" # bypass normal keyboard input on the Linux console, maybe dangerous $_rawkeyboard = (0) # 30 == Ctrl-^ (Ctrl-6 on US keyboards), special-sequence prefix for # terminals use Ctrl-^ h for help $_escchar = (30) #################################################################### ############ Mouse settings # Use internal mouse driver. Default = (on). # $_mouse_internal = (on) ## all other mouse settings: console only (ignored for #remote/xterm/xdosemu) # type: one of microsoft, mousesystems, logitech, mmseries, mouseman, # hitachi, busmouse, ps2, imps2. Default: "" (no mouse or serial # mouse via DOS driver) $_mouse = "ps2" # Mouse device: one of: com1, com2, com3, com4 (for DOS serial mouse # driver-- overrides $_mouse_internal) # or /dev/mouse (for the DOSEMU internal mouse driver). Default: "" $_mouse_dev = "/dev/mouse" # Default: "" or one or more of: "emulate3buttons cleardtr" $_mouse_flags = "" # baudrate, default: 0 == don't set $_mouse_baud = (0) #################################################################### ############ Joystick config # 1st and 2nd joystick device # e.g. "/dev/js0" or default: "/dev/js0 /dev/js1" # (or "" if you don't want joystick support) # $_joy_device = "/dev/js0 /dev/js1" # range for joystick axis readings, must be > 0, default: 1 # $_joy_dos_min = (1) # avoid setting the maximum to > 250, default: 150 # $_joy_dos_max = (150) # the higher, the less sensitive - useful if you have a wobbly # joystick. default: 1 # $_joy_granularity = (1) # delay between nonblocking linux joystick reads increases # performance if >0 and processor>=Pentium recommended: 1-50ms or 0 # if unsure. default: 1 # $_joy_latency = (1) #################################################################### ############ Serial port settings # use e.g. "/dev/mouse", "/dev/ttyS0", "/dev/ttyS1", ... # Note: all "/dev/ttyXX" may be suffixed by the IRQ # used (instead of the default one), such as "/dev/ttyS2 irq 5" # or "/dev/ttyS3 irq 9". Default: "" $_com1 = "/dev/ttyS0 irq 4" $_com2 = "" $_com3 = "" $_com4 = "" # Lock directory (e.g. default: "/var/lock") $_ttylocks = "/var/lock" #################################################################### ############ Printer settings # list of (/etc/printcap) printer names to appear as LPT1, LPT2, LPT3 # (not all are needed, empty for none). Default: "lp" # use "" if you want the printer_command (below) free-form (LPT1 # only) # $_printer = "lp" # Print command to use. Default: "lpr", for "lpr -P printername". # Sometimes (with CUPS) "lpr -l" is necessary. # $_printer_command = "lpr" # idle time in seconds before spooling out. Default: (20) # $_printer_timeout = (20) #################################################################### ############ Speaker and sound settings # speaker: default: "emulated", or "native" (console only) or "" # (off) # $_speaker = "emulated" # sound support on/off $_sound = (off) # (emulated!) Sound Blaster base i/o port, default: (0x220) $_sb_base = (0x220) # Sound Blaster IRQ setting, default: (5) $_sb_irq = (5) # Sound Blaster 8 bit DMA setting, default: (1) $_sb_dma = (1) # Sound Blaster 16 bit DMA setting, default: (5) # $_sb_hdma = (5) # Sound device, default: "/dev/dsp" $_sb_dsp = "/dev/dsp" # Sound mixer device, default: ""; use "/dev/mixer" if you allow that # dosemu changes the volume $_sb_mixer = "/dev/mixer" # Midi base i/o port $_mpu_base = "0x330" # The following options are driver-specific and it is not necessary # to alter the default values in most cases. Read sound-usage.txt for # more. Defaults: min_frags: 4, max_frags: 0x20, stalled_frags: 1, # do_post: off, min_extra_frags: 2. # $_oss_min_frags = (4) # $_oss_max_frags = (0x20) # $_oss_stalled_frags = (1) # $_oss_do_post = (off) # $_oss_min_extra_frags = (2) #################################################################### ############ Network settings # NOTE: Network/packet driver support needs root privileges (except # for TUN/TAP) # 'on' for Packet Driver. Default: off $_pktdriver = (off) # use Novell specific hack. Default: off # $_novell_hack = (off) # network device for Packet Driver; default: "eth0" $_netdev = "eth0" # packet driver type "dosnet" for dosnet, default: "tap" for TUN/TAP # ($_vnet setting overrides $_netdev) $_vnet = "off" # NOTE: IPX needs root privileges unless you setup # /proc/net/ipx_route in advance. DPMI support for IPX is broken. # Default: (off) $_ipxsupport = (off) #################################################################### ############ Setting specific to the X Window System (xdosemu, dosemu #-X) # time between refreshes (units: 20 == 1 second). Default: 5 $_X_updfreq = (5) # Title in the top bar of the window. Default = "DOS in a BOX" # $_X_title = "Linux Dos Box" # Text for icon, when minimized. Default = "xdosemu" # $_X_icon_name = "xdosemu" # Start DOSEMU in fullscreen mode. Default = "off" # $_X_fullscreen = (off) # on==translate keyboard via dosemu keytables, or 'off' or 'auto'. # Default:auto # $_X_keycode = (auto) # blink rate for the cursor # $_X_blinkrate = (12) # name of the X font that is used (e.g. "vga") default = "" (bitmap # fonts) # $_X_font = "" # Use shared memory extensions. Faster, but problematic with remote # X. Default: on # $_X_mitshm = (on) # share the colormap with other applications. Default: off # $_X_sharecmap = (off) # Set fixed aspect for resizing the graphics window. Default: on # $_X_fixed_aspect = (on) # Always use an aspect ratio of 4:3 for graphics. Default: on # $_X_aspect_43 = (on) # Use linear filtering for >15 bpp interpolation. Default: off # $_X_lin_filt = (off) # Use bi-linear filtering for >15 bpp interpolation. Default: off # $_X_bilin_filt = (off) # initial size factor for video mode 0x13 (320x200) # $_X_mode13fact = (2) # "x,y" of initial windows size (defaults to ""=float) # $_X_winsize = "" # gamma correction. Default: 1.0 # $_X_gamma = (1.0) # size (in Kbytes) of the frame buffer for emulated vga. Default: # 1024K # $_X_vgaemu_memsize = (1024) # use linear frame buffer in VESA modes. Default: on # $_X_lfb = (on) # use protected mode interface for VESA modes. Default: on # $_X_pm_interface = (on) # KeySym name to activate mouse grab, ""=off. Default: "Home" # (ctrl+alt+home) # $_X_mgrab_key = "Home" # List of vesamodes to add. The list has to contain SPACE separated # "xres,yres" pairs, as follows: "xres,yres ... xres,yres". Default: # "" # $_X_vesamode = "" # pause xdosemu if it loses focus # $_X_background_pause = (off) #################################################################### ############ Direct hardware access # NOTE: the settings below here that are marked [priv] are only valid # in a system-wide dosemu.conf and cannot be changed by ~/.dosemurc. # For these settings to take effect, DOSEMU must be run with root # privileges; either run it as root or sudo/suid with adjustments in # dosemu.users. # [priv] list of portnumbers such as "0x1ce 0x1cf 0x238" or # "0x1ce range 0x280,0x29f 310" or "range 0x1a0,(0x1a0+15)". Default: # "" All ports are slow and can be logged by default. However ports < # 0x400 can be set as "fast" too: example (with multiple lines) # $_ports = "device /dev/null fast 0x200" # $_ports = $_ports, " device /dev/lp0 fast range 0x378 0x37a" # The blank is important # "device" means: if the ports are registered, open this device to # block access. The open must be successfull or access to the ports # will be denied. If you know what you are doing, use /dev/null to # fake a device to block $_ports = "0x278 0x378 0x37f", " device /dev/ttyS0 fast range 0x3f8,0x3ff", " device /dev/lp0 fast range 0x3bc 0x3bf" # [priv] list of IRQ numbers (2-15) to pass to DOS such as "3 8 # 10".Default: "" $_irqpassing = "4" # [priv] DOS memory to map directly: list of segment values/ranges # such as # "0xc8000 range 0xcc000,0xcffff". Default: "" $_hardware_ram = "range 0xd400, 0xefff" # [priv] on: give access to the PCI configuration space. Default: # (off) $_pci = (off) #################################################################### ############ Console video # The following settings apply to direct console video only and are # ignored by xdosemu. Many are privileged and need suid/sudo/root. # use 'console' video (direct video ram access). Default: (0) $_console = (0) # use the cards BIOS to set graphics and allow direct port i/o. # Default: (0) $_graphics = (0) # [priv] run the VGA card's initialization BIOS routine (most cards # don't need this). Default: (0) # $_vbios_post = (0) # [priv] set the address of your VBIOS (e.g. 0xc000, 0xe000). # Default: (0)=autodetect. $_vbios_seg = (0xc000) # [priv] set the size of your BIOS (e.g. 0x10000, 0x8000). # Default: (0)=autodetect. $_vbios_size = (0xc000) # [priv] size of (real) video RAM. Default: 1024 $_vmemsize = (1024) # [priv] real chipset: one of: plainvga, trident, et4000, diamond, # avance # cirrus, matrox, wdvga, paradise, ati, s3, sis, svgalib # these drivers are likely to be out of date for modern cards; # "plainvga" may work. Default: ""="plainvga" $_chipset = "" # [priv] see $_ports, but these are only opened if DOSEMU is run on # the Linux console. Default: "" # $_console_ports = "" # [priv] see $_pci, but this option is only used if DOSEMU is run on # the Linux console. Default: (off) # $_console_pci = (off) # [priv] if you have one vga _plus_ one hgc (2 monitors) $_dualmon = (0) #################################################################### ############ DOS Clock mode settings: bios pit or linux $_timemode = "linux" -- __ __ _ I N C. http://www.sysdev.org / __|\\// __|| \ __ __ / tonyb@sysdev.org \__ \ \/\__ \||)|/ O_)\/ / \/ System Tools / Utilities |___/ || ___/|_ /\___|\_/ WIntel / Linux Device Drivers ^ permalink raw reply [flat|nested] 18+ messages in thread
* Signaling dosemu application to kill itself from Linux @ 2005-04-06 7:14 tonyb 0 siblings, 0 replies; 18+ messages in thread From: tonyb @ 2005-04-06 7:14 UTC (permalink / raw) To: linux-msdos The problem is that if dosemu is killed from Linux (crond), and the dosemu console is in focus, the screen/kbd could cause Linux to reboot because they were left in a bad state by a dos tsr. Anyone has a mechanism such that, by signaling with a file touch or somthing else from crontabs/root, will allow the tsr/app to exit gracefully before a kill... Thanks TonyB -- __ __ _ I N C. http://www.sysdev.org / __|\\// __|| \ __ __ / tonyb@sysdev.org \__ \ \/\__ \||)|/ O_)\/ / \/ System Tools / Utilities |___/ || ___/|_ /\___|\_/ WIntel / Linux Device Drivers ^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2005-04-10 8:40 UTC | newest] Thread overview: 18+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-04-06 16:06 Signaling dosemu application to kill itself from Linux Stas Sergeev 2005-04-06 22:16 ` tonyb 2005-04-07 0:47 ` Gene Heskett -- strict thread matches above, loose matches on Subject: below -- 2005-04-10 8:40 Stas Sergeev 2005-04-08 3:55 Stas Sergeev 2005-04-10 0:32 ` tonyb 2005-04-07 17:59 Stas Sergeev 2005-04-07 17:50 Stas Sergeev 2005-04-08 2:14 ` tonyb 2005-04-07 3:45 Stas Sergeev 2005-04-07 9:07 ` Andrew Brooks 2005-04-07 16:23 ` tonyb 2005-04-07 17:25 ` Gene Heskett 2005-04-07 16:06 ` Gene Heskett 2005-04-07 16:35 ` Andrew Brooks 2005-04-07 3:38 Stas Sergeev 2005-04-07 6:12 ` tonyb 2005-04-06 7:14 tonyb
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox