![]() |
On Wed, 23 Jul 1997, Tim Rice wrote: > > HylaFAX v4.0pl1 > UnixWare 2.03 & 2.1.2 > > I decided to track down an error in the syslog files. > .... > Jul 23 07:30:43 trruw21 FaxGetty[689]: Unable to set RT scheduling > parameters: Invalid argument > .... > > I found it was coming from faxd/ModemServer.c++. > The offending system call was priocntl(2) > I discovered that UnixWare's version of priocntl(2) has no "RT" class. > It does have FC (Fixed Priority Class) which acording to the man page > "This ensures that a runnable fixed priority process is given > CPU service before any process belonging to any other class." > That sounds close to a Real Time Class. > > I plan to impliment a patch that looks for sys/fppriocntl.h and sumbstitutes > the RT class for FC class. > > What I need to know is: > a) Has anyone allready done this work? It turns out Tony Lill had done the work allready. I stripped out the neccessary stuff from a largre diff file Tony sent me, applied it, and tested it. It works great. Thanks Tony. Faxes that had trouble befor now work. I've attached the patch. > > b) Are there any platforms that have a priocntl(2) > with both RT and FC (and of course TS) classes? > > c) Are there any platforms with the RT class that > also have sys/fppriocntl.h? > > > Thanks, > > -- > Tim Rice Multitalents (707) 887-1469 (voice) > tim@trr.metro.net > > -- Tim Rice Multitalents (707) 887-1469 (voice) tim@trr.metro.net *** configure.old Thu Jul 31 20:28:11 1997 --- configure Thu Jul 31 20:22:24 1997 *************** *** 2692,2697 **** --- 2692,2701 ---- Note "... configure use of SVR4 realtime process control interface" echo '#define HAS_PRIOCNTL 1' } + CheckForDefine FP_NOCHANGE sys/priocntl.h sys/fppriocntl.h && { + Note "... called FP instead of RT" + echo '#define HAS_FPPRIOCNTL 1' + } CheckForDefine NDPRI sys/schedctl.h && { Note "... configure use of IRIX realtime process control interface" echo '#define HAS_SCHEDCTL 1' *** faxd/ModemServer.c++.old Tue Nov 26 12:00:00 1996 --- faxd/ModemServer.c++ Thu Jul 31 20:22:24 1997 *************** *** 257,263 **** --- 257,267 ---- #elif HAS_PRIOCNTL extern "C" { #include <sys/priocntl.h> + #ifdef HAS_FPPRIOCNTL + #include <sys/fppriocntl.h> + #else #include <sys/rtpriocntl.h> + #endif #include <sys/tspriocntl.h> } static struct SchedInfo { *************** *** 269,277 **** --- 273,287 ---- { "TS", { TS_NOCHANGE, TS_NOCHANGE } }, // MODEMWAIT { "TS", { TS_NOCHANGE, TS_NOCHANGE } }, // LOCKWAIT { "TS", { TS_NOCHANGE, TS_NOCHANGE } }, // GETTYWAIT + #ifdef HAS_FPPRIOCNTL // if still fails, set prio to 0 + { "FP", { FP_NOCHANGE, FP_NOCHANGE, FP_TQDEF } },// SENDING + { "FP", { FP_NOCHANGE, FP_NOCHANGE, FP_TQDEF } },// ANSWERING + { "FP", { FP_NOCHANGE, FP_NOCHANGE, FP_TQDEF } },// RECEIVING + #else { "RT", { RT_NOCHANGE, RT_NOCHANGE, RT_NOCHANGE } },// SENDING { "RT", { RT_NOCHANGE, RT_NOCHANGE, RT_NOCHANGE } },// ANSWERING { "RT", { RT_NOCHANGE, RT_NOCHANGE, RT_NOCHANGE } },// RECEIVING + #endif { "TS", { TS_NOCHANGE, TS_NOCHANGE } }, // LISTENING }; #elif HAS_RTPRIO *************** *** 318,328 **** --- 328,346 ---- if (priocntl((idtype_t)0, 0, PC_GETCID, (caddr_t)&pcinfo) >= 0) { pcparms_t pcparms; pcparms.pc_cid = pcinfo.pc_cid; + #ifdef HAS_FPPRIOCNTL + if (streq(si.clname, "FP")) { + fpparms_t* fpp = (fpparms_t*) pcparms.pc_clparms; + fpp->fp_pri = si.params[0]; + fpp->fp_tqsecs = (ulong) si.params[1]; + fpp->fp_tqnsecs = si.params[2]; + #else if (streq(si.clname, "RT")) { rtparms_t* rtp = (rtparms_t*) pcparms.pc_clparms; rtp->rt_pri = si.params[0]; rtp->rt_tqsecs = (ulong) si.params[1]; rtp->rt_tqnsecs = si.params[2]; + #endif } else { tsparms_t* tsp = (tsparms_t*) pcparms.pc_clparms; tsp->ts_uprilim = si.params[0]; X-Sender: mario@laus.dbk.laus.hr X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.2 (32) Date: Tue, 23 Sep 1997 08:12:08 +0300 To: jawildman@cfanet.com From: Mario Misic <mario@laus.hr> Subject: Re: flexfax: Sending fax with different permission Cc: flexfax@sgi.com Sender: owner-flexfax@celestial.com At 10:42 1997.09.22 +0000, Jim Wildman wrote: >In your modem config file > >RecvFileMode: 0640 > Yes I know that I can setup permission for received faxes, but I want to change permission on fax wich I am sending. When I send fax, there hylafax make postscript file in directory /var/spool/fax/docq/ with permission 0600 but I want permission 0644. >> Date: Mon, 22 Sep 1997 15:53:59 +0300 >> To: flexfax@sgi.com >> From: Mario Misic <mario@laus.hr> >> Subject: flexfax: Sending fax with different permission > >> >> Hi! >> >> >> Is it possible to configure hylafax to send fax with different permission >> than 600! >> >> I want to give everyone file permissions 644 in directory >> /var/spool/fax/docq/. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ Mario Misic | e-mail: mario@laus.hr ~ ~ CC Computer Consulting | Tel: +385 (20) 411-136 ~ ~ Janjevska 15 | +385 (1) 6552-330 ~ ~ 20 000 Dubrovnik | Fax: +385 (20) 411-136 ~ ~ Hrvatska (Croatia) | URL: http://www.laus.hr ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>>>>>>>>> Every dog will have his day ! <<<<<<<<<<<<<< ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~