I've got a perl CGI thing that needs to check in data files with ci, because of child-safety and Tracking Revisions Is Good.

But doing this fails in the new script (and works in an older one!): system("ci","-u","-mautocheckin",$dbf); (of course there's error handling in the real code which is not shown here...)

I ponder my code, compare it with the old script that works and see no difference, I make a test script only containing the ci invocation and that doesn't work. So I suspected the small webserver on the testbox, boa, of being overly stupid. Further mucking around shows that no, it ain't.

More testing. And doing this fails, too: system("ci -u -mautocheckin $dbf"); Still more testing and head-scratching. And of course, doing this fails as badly as any of the previous attempts to figure out what's going wrong: my $wtf=ci -u -mautocheckin $dbf;

This is about when I started questioning my sanity. Especially as this works: my $wtf=ci -u -mautocheckin $dbf 2&>1;

Eventually it dawned to me that bloody ci requires STDERR to be something useful (like /dev/null, for example)...The stupid piece of shit barfs in a CGI environment when STDERR is n/a (and when the "-q" option isn't present).

But only the new script, the old one works perfectly well - the same rcs code, on the same server etc. pp. I have no clue whatsoever why the new script needs "-q" for ci to shut it up and the old one doesn't...ass.

[ published on Thu 14.04.2005 17:18 | filed in brainfarts | ]
Debian Silver Server
© Alexander Zangerl