Description of problem: The "print" operation in dia pops up a "select printer" dialog. That dialog, however, does not want a printer; it wants a print command. If you type a printer name, dia immediately crashes. It prints shell complaints; I assume it is getting (and not handling) a SIGPIPE. Version-Release number of selected component (if applicable): dia-0.95-7.fc6 How reproducible: Completely Steps to Reproduce: 1. Start dia 2. Select print 3. Type something random in the text box next to "printer" 4. Tell it to do it Actual results: Dies after printing: Traceback (most recent call last): File "/usr/share/dia/python-startup.py", line 1, in ? import sys, os ImportError: No module named os Print dialog? sh: officejet: command not found Expected results: Beautiful printed versions of my most artistic drawings. No crash would also be really nice. Additional info:
Hi Jonathan, Great article on who wrote 2.6.20, when I have discussions on why I don't use Ubuntu I always say that I find that Ubuntu contributes little to upstream projects, no I have some "hard" numbers to back that up :) Anyways back on topic. I've been debugging this a bit and the problem indeed is sigpipe, the dia code already catches this, but with plain signal(). Since dia's ./configure adds -ansi to the CFLAGS signal installs a oneshot handler (bsd behavior instead of sysv behavior). I've written a patch changing the code to use sigaction, which is more predictable in what it does. This fixes the problem you describe. That still leaves the fact that its a pretty worthless printing interface, dia also has experimental gnomeprint support. When sending my patch upstream I'll ask what the status of that support is. I've just send dia-0.95-8 to the buildsys with this fixed, it should show up on a mirror near you soon.