APLawrence - Information and Resources for Unix and Linux Systems, Bloggers and the self-employed
RSS Feeds Get APLawrence.com by RSS











(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Home > News Posts > Using SECSTOPIO for printer locking ––>Re: Open Server 5.0.5 spooler vs hot printer
Printer Friendly Version




News Group Posts

Using SECSTOPIO for printer locking


SCO's SECSTOPIO kernel parameter controlled the behavior of the stopio(S) system call. This took a file path as an argument and, if set, would cause read, write and ioctl to fail - and also send a sighup to the process that dared touch its now protected file.

The SECSTOPIO parameter turns stopio on and off (0 or 1). Apparently some versions of SCO would send two SIGHUPS in quick succession and (because processes need some time to reset their traps) this would kill the offending process.

This post concerns a printer port, but stopio can be seen in places as unexpected as telnet - see telnetd stopio.




From: Bob Bailin <72027.3605@CompuServe.COM>
Subject: Re: Open Server 5.0.5 spooler vs hot printer
References: <19990610131023.09800.00000104@ng-fk1.aol.com> 
Message-ID: <uq44D22s#GA.332@nih2naac.compuserve.com> 
Newsgroups: comp.unix.sco.misc
Date: Thu, 10 Jun 1999 14:17:34 -0400

Configure the kernel parameter SECSTOPIO = 0 to disable this feature.

dbush3054@aol.com (Dbush3054) writes:
> 
> Running Open Server 5.0.5.  Have always used the same
> physical printer as a spooler AND a hot printer (direct
> access from application). Our application creates a lock
> file in /tmp similar to this: /tmp/lp.lck to indicate
> that the printer is being used and blocks other users
> from accessing the printer until the lock file is remove
> by the application. In the past we have successfully
> modified the 'lp' script to check for the existence of
> this file and wait if necessary. The script I modified
> is in /usr/spool/lp/admins/lp/interfaces (linked to
> /var/spool/lp/admins/lp/interfaces). The 'lp' script
> was created when we created the spool printer 'lp' from
> /usr/spool/lp/model/standard).


> Does not work in Open Server 5.0.5.  After putting several
> echo statements in  the script, I have determined that
> the script file is properly waiting if the  /tmp/lp.lck
> file exists. I can watch it loop endlessly until the
> lock file is  removed by the application.  This works
> when testing because while testing I  was not actually
> printing from my application, I was just selecting the
> printer  to create the lock file and then the application
> is waiting for operator input  (the application hasn't
> actually sent anything to the printer after creating
> the lock file). When I exit the application, it removes
> the lock file and the  spooler then begins to print.
> All is well, right ?  WRONG !!!
> 
> If the application attempts to print after the spooler
> script is 'looping', the  application IMMEDIATELY gets
> logged off, which removes the lock file in /tmp  and
> allows the spooled job to print.  I think something before
> the spooler  script is closing the port, which causes my
> application to be logged when it  attempts to print.
> 
> Any suggestions ???
> 
> Thanks in Advance - Dan















-- 
Bob Bailin
72027.3605@compuserve.com


If this page was useful to you, please click to help others find it:  

Your +1's can help friends, contacts, and others on the web find the best stuff when they search.

Comments?




More Articles by



Click here to add your comments



Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar



Auto FTP Manager

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.


My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!


book graphic unix and linux troubleshooting guide


 I sell and support
 Kerio Mail server
pavatar.jpg

This post tagged:

       - Kernel
       - Printing
       - SCO_OSR5




Unix/Linux Consultants

Skills Tests

Guest Post Here