freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] proposed bsqldb patch
- Date: Fri, 29 Jun 2007 00:05:54 -0400
Medi Montaseri wrote:
> I modified bsqldb.c and provided a -w option (w for waitfor) such that
> -w 0 // default value, meaning don't throttle, blast away
> -w n // where n is > 0 and it means sleep for n seconds
> -w -n // where n is < 0 and it means sleep for ever
This is interesting. Usually people are interested in going faster....
;-)
I think -wN could mean "wait N seconds" and -w0 could mean wait forever.
There's no need for a "blast away" option; that's SOP.
> In the course of changing bsqldb.c I noticed that the current design is
> reopen-ing stdin, stderr and stdout to support -o -e -i.
...
> 2- Since the case of -w -1 requires receiving input from stdin, it
> creates a conflict between -i which has been reopend as stdin.
> 2.1 - I can either change the entire code and not use reopen but simply
> use a different descriptor for -i, -o, -e processing. Or
> 2.2 - I can temporarly reopen stdout and stdin while interacting with
> user and put it back to -o -i
It seems to me it would be useful to be able to do this:
echo $query | bsql -w0 ...
IOW, it would be nice to get user input regulating the statement
processing from somewhere other than stdin.
But where? I think getpass(3) is your friend. It reads directly from the
terminal, bypassing stdin. The input doesn't have to be a password, and
neither you nor the user cares what's typed except for the CR, so it
doesn't matter that it's not echoed.
> Please let me know and if it is a go...who should I coordinate this
> patch or checkin with ?
Best is to post a patch to Source Forge, second best to attach it to a
message posted here. If your patch applied cleanly to the nightly
snapshot, it has the best chance of being included right away.
--jkl
-
[freetds] (no subject),
Medi Montaseri, 06/26/2007
- Re: [freetds] proposed bsqldb patch, James K. Lowden, 06/29/2007
Archive powered by MHonArc 2.6.24.