Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-30-2009, 05:06 PM   #1
LQ Newbie
Registered: Mar 2006
Posts: 10

Rep: Reputation: 0
Programming Question - Is it possible to keep parport from issuing EBUSY?

I have an application program that writes a log to a parallel printer.
Specifically, the program spawns a program with a pipe and then writes to that pipe. The program at the other end of the pipe does the printing.

However, I can have several of these programs running at once. Until recently all were using the same program for printing. This worked just fine for decades. (Yes, the program is older than Linux.)

But if I write a new program (in GTK) that also tries to write to the printer (directly, not via the pipe), the second instance gets an EBUSY signal.

While I can see a value to this when people are printing long reports, using spoolers and such, it's not helping me.

(I believe) write is an interruptible system call. The amount of data sent is 81 characters or less.

Pretty much, it's in my way.

However, I'm not trying to whine. I'm trying to find out if there's a way to tell the driver (or whatever it is) just open a second instance.

If not, I have a couple ideas of how to get around this. One is to simply open the printer (waiting until no EBUSY if needed), write, close the printer...repeat.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
UDEV and parport Module Loading Toods Slackware 1 02-09-2009 08:13 AM
cant create parport devices chimi Linux - Hardware 2 10-09-2006 10:12 AM
Prevent lp and parport module from loading jlinkels Linux - Hardware 0 10-16-2005 08:49 PM
right to write at the /dev/parport tortue Linux - General 2 01-15-2004 03:07 PM
backpack series 6 parport install hfelton Slackware 0 05-13-2003 12:09 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:24 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration