wehr@fmeed1.UUCP (Bruce Wehr) (04/27/89)
We recently installed HP-UX 6.5 here. Two items appeared almost immediately: _P_r_o_b_l_e_m_ _1_: We have some ksh scripts (beginning explicitly with '#!/bin/ksh') that take advantage of the job syntax '%jobno'. The scripts launch a couple of jobs in the background, perform the foreground task, and then do a 'kill %1 %2 ...' to terminate the background jobs. With HP-UX 6.5, the message "kill: %1:No such job" is issued if this is attempted from a script. This still works fine interactively. Try: sleep 5 & kill %1 both interactively and from an explicit #!/bin/ksh script to see what I mean. I've read the 6.5 update notes, and thought that this might be a side effect of the new job control, but I can't seem to pinpoint it. _P_r_o_b_l_e_m_ _2_: We access our 370 here mainly over a Sytek LAN. These Sytek boxes are configured to disconnect the current session when it sees DTR drop. DTR is supposed to be dropped by the system when a user logs out, until the next getty opens the port. This is no longer happening with HP-UX 6.5. I see no reference in the update notes about the tty drivers changing. Many thanks in advance for any pointers regarding either or both of these problems. -- Bruce Wehr (...!mailrus!sharkey!fmeed1!wehr) (wehr%fmeed1.uucp@mailgw.cc.umich.edu) Ford Motor Company - Electronics Division 17000 Rotunda Drive, DPTC Room LN081, Dearborn, Michigan 48121 (313)845-3039
wehr@fmeed1.UUCP (Bruce Wehr) (05/13/89)
In article <1020024@hp-ses.SDE.HP.COM>, tai@hp-ses.SDE.HP.COM (Tai Jin) writes: > |We access our 370 here mainly over a Sytek LAN. These Sytek boxes are > |configured to disconnect the current session when it sees DTR drop. DTR > |is supposed to be dropped by the system when a user logs out, until the > |next getty opens the port. This is no longer happening with HP-UX 6.5. > |I see no reference in the update notes about the tty drivers changing. > > You might try to set HUPCL in the /etc/gettydefs file for that line or do > a "stty hupcl". Unfortunately, this is the way I was already set up. Something changed with Revision 6.5. Does anyone know what? Is anyone out there using DTR control with HP-UX 6.5? If so, can you tell me your set-up (special file minor number, etc...)? This capability is important to me. > |We have some ksh scripts (beginning explicitly with '#!/bin/ksh') that > |take advantage of the job syntax '%jobno'. The scripts launch a couple > |of jobs in the background, perform the foreground task, and then do a > |'kill %1 %2 ...' to terminate the background jobs. > > The shell must be in interactive mode for this to work. That is, you should > have "#!/bin/ksh -i" at the beginning of your script. Altering my script as you suggest does make this feature work. It also litters the output with unnecessary prompt characters. I can't find this requirement documented anywhere. Maybe this feature was never intended to be used in a script. But, it *used* to work in a script. I mean, please, excuse me while I... * FLAME ON * I don't have time to read the documentation cover to cover before I attempt to implement something. So, there are times I just 'try it and see if it works'. If it does, GREAT. If it doesn't, maybe a peek at the documentation will help. If it *does* work, but the documentation says that it isn't *supposed* to work that way, I don't know that. If a change is made to HP-UX to make the *actual* match the *documented*, that's great, *BUT*......... *PUT* *IT* *IN* *THE* *UPDATE* *NOTES* Both of the above mentioned situations (DTR on hang-up, %jobno syntax for ksh) were operating in a fashion that I took advantage of (I won't dispute whether the behavior was *correct* or not). When I upgraded OS's, I changed nothing else (except for a 350 -> 370 upgrade; don't tell me *that's* my problem). The behavior of these items changed, and the system no longer operated in the same fashion. I don't have the time to re-search the documentation, or re-learn the material. I *make* time to read update notes. I saw *NOTHING* in the update notes. * FLAME OFF * I'm not addressing anyone in particular (even though I did pick your article, Tai :-). I just thought that this is the way things should be. I've resolved the %jobno problem by not using that syntax at all. The script remembers the PID (jobx=$!) after starting each background job. It kills them later the same way (kill $job1 $job2). However, the DTR problem still eludes me. And while I'm on the subject of tty drivers, here's one: Is there any way (minor number, etc...) to enable hardware handshaking? I'm getting a Trailblazer soon, and would like to use hardware handshaking. I've read suggestions about using XON/XOFF with the UUCP 'f' protocol, and I'm looking into it. But, hardware handshaking works for the Datacomm card (98628?) under the BASIC Workstation. Can I somehow enable it under HP-UX? Any other comments? Suggestions? Criticisms? Solutions? Problems? Thanks for letting me bend your ear :-) -- Bruce Wehr (wehr%dptc.decnet@srlvx0.srl.ford.com) (...!mailrus!sharkey!fmeed1!wehr) (wehr%fmeed1.uucp@mailgw.cc.umich.edu) Ford Motor Company - Electronics Division 17000 Rotunda Drive, DPTC Room LN081, Dearborn, Michigan 48121 (313)845-3039
wehr@fmeed1.UUCP (Bruce Wehr) (05/23/89)
In article <3240090@hpfcdc.HP.COM>, rer@hpfcdc.HP.COM (Rob Robason) writes: > I can sympathize with your feelings if your job is not primarily to > develop software, it would be nice if these things were more intuitive. Software development *is* my primary job. System administration is not. > [...] But what you describe > is generally an unsafe software development practice. [...] > There are literally thousands of cases where it is unsafe to rely on > anything other than the documented behavior of calls and commands in > writing applications. The ksh %jobno syntax *was* documented. The fact that it must be an interactive shell was not. Was I wrong to use it in a script? > What I hope is that applications developers will treat software > development as a job to be performed in a professional manner, not as a > hobby to be done in one's spare time. Amen. Unfortunately, system administration is something I must do as a hobby in my spare time. Learning the file system, system calls, etc. well enough to develop robust applications is a full time job. Learning shells, tty drivers, user account management, etc. is a full time job, too. I try my best to do both, but writing applications has priority. In general, I could not agree with your positions more. I just don't think I was taking advantage of 'undocumented features'. Do you? -- Bruce Wehr (wehr%dptc.decnet@srlvx0.srl.ford.com) (...!mailrus!sharkey!fmeed1!wehr) (wehr%fmeed1.uucp@mailgw.cc.umich.edu) Ford Motor Company - Electronics Division 17000 Rotunda Drive, DPTC Room LN081, Dearborn, Michigan 48121 (313)845-3039