Re: MMap offset parameter failing with ENOMEM error
On Thu, Sep 19, 2002 at 12:19:06PM +1000, Shane Mann wrote: > Hi, > > I am having trouble with mmap using the last 'offset' parameter. I have > attached a small piece of code (and sample file) which demonstrates the > problem. Basically if the offset parameter is passed as a variable to mmap > then the call fails with an ENOMEM error. But if you pass 0 as the parameter > and then access the return address from mmap + offset - it is fine. My > question: is mmap handling the offset parameter correctly? > > Usage for the program: > > ./a.exe eg: ./a.exe 11200 index.idx > > To see the address + offset work, comment out the first mmap call and return > statement and uncomment the lines below each one. > > Any help appreciated. Your application tries to mmap over EOF. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developermailto:[EMAIL PROTECTED] Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
ldd.cygwin
I have polished up the "ldd" script some more and have posted it at http://www.shore.net/~swift/ldd.cygwin.txt (The .txt extension seems to be necessary for proper viewing in browsers.) If you are bored, try 'ldd -v /bin/*.exe' and watch the time pass... It won't look at non-executables yet, but that should not be hard to fix. (See a comment on buggy(?) behavior of "type -p".) I probably won't do more with this than fix that sometime. On Wed, Sep 18, 2002 at 11:37:55AM -0600, Warren Young wrote: >Matt Swift wrote: >>Attached is a bash script that emulates the ldd(1) utility. Enjoy. > >I wanted this very thing the other day! Thanks, Matt. > >My only complaint is that it should give usage (or demand --help) when >you run it without arguments. > >I vote that this be added to Cygwin. Binutils, perhaps? Then you're sending email to the wrong mailing list. The binutils mailing list is [EMAIL PROTECTED] . cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Attempting "Emacs this file"
Hi all, I'm trying to get this little Windows Explorer right-click menu add-on to work and having problems. I want to be able to right click on a file and have emacs open it in an rxvt. It almost works...the menu item appears, the rxvt opens, emacs runs...but the object file %1 doesn't get sucked in. Here's my attempt: Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\0cmd-gnuemacs] @="Gnuemacs" [HKEY_CLASSES_ROOT\*\shell\0cmd-gnuemacs\command] @="F:\\Unix\\cygwin\\bin\\rxvt.exe -g 100x40+50+50 -ls -sr -sb -sl 1000 -fg Black -bg LightSteelBlue -fn 'Courier New' -e /usr/bin/bash --login -c emacs \\\"'%1'\\\"" I did a lot of searching about this an saw discussions which involved "gnuclientw" as a solution. [HKEY_CLASSES_ROOT\*\Shell\Edit_with_Emacs] @="Edit with &Gnu Emacs" [HKEY_CLASSES_ROOT\*\Shell\Edit_with_Emacs\command] @="F:\\Unix\\cygwin\\bin\\gnuclientw.exe -F -q \"%1\"" I found that on the web and played with it...but it seems to rely on another program called "runemacs.exe" which I couldnt locate. This seems to be an NTEmacs program and not a Cygwin Gnuemacs program. Im confused. I see lots of posts about NTEmacs, NTEmacs = Gnuemacs, Xemacs... but, what is the actual Emacs in the Cygwin distribution? Just Gnuemacs, right? Well, I'm betting that there's an easy answer and that someone, who has used cygwin longer than I, can enlighten me. Thanks, JH __ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Shed light on Tetex packages
Hello Tetex maintainer, looking at the currently available Tetex packages I wonder whether it is really good to follow the "install everything" method, since they seem to be not disjuctive. Reading the announcement in http://sources.redhat.com/ml/cygwin-announce/2002-08/msg7.html I seem to have following options: Install either - tetex-bin, tetex-base and libkpathsea3 or - tetex-tiny You might also install optionally: - tetex-doc - tetex-extra - tetex-devel - tetex-x11 And you have an install helper: - tetex Additionally there are "upgrade helpers": - texmf-* - tetex-beta I did not found any doc, readme or FAQ that explains exactly the dependency of all these packages. Looking at the behaviour of setup the dependecies become clearer, but not anything is obvious. For a new installation of Cygwin I assume that - none of the texmf-* or the tetex-beta packages should be chosen - either tetex-base or tetex-tiny should be chosen, tetex-bin and libkpathsea3 are selected automatically - tetex-extra is only optional if tetex-base was chosen - tetex-x11 is only optional if tetex-tiny was chosen - tetex-doc and tetex-devel are optional independent of the "basic" choice - whats package "tetex" for? It seems again incompatible with the tetex-base choice. It is not clear, what happens if I "accidently" activate tetex-base *and* tetex-tiny. Even worse, it seems that uninstalling tetex-tiny will destroy also tetex-base and vice versa. It would be fine if one could read at least in the FAQ about the possible choices and its consequences. Regards, Jörg -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: rxvt doesn't paste selections anymore?
$ rxvt --version Usage v2.7.2 : (XPM,menubar,.Xdefaults) ... $ cygcheck -s ... Cygwin DLL version info: DLL version: 1.3.12 DLL epoch: 19 DLL bad signal mask: 19005 DLL old termios: 5 DLL malloc env: 28 API major: 0 API minor: 54 ... Shift-Left-click pastes fine. I copied the information out of an rxvt terminal (Cygwin updated yesterday). C:\cygwin\bin\rxvt.exe -fn "Lucida Console-12" -sr -bg black -fg grey -sl 1000 -cr red -vb -e bash --login As a shortcut starts fine with the DOS box disappearing quickly. Hope this helps, Alistair. - Original Message - From: "Deragon, Hans" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 19, 2002 1:14 AM Subject: Re: rxvt doesn't paste selections anymore? > Found the same problem. On both of my machines, rxvt 2.7.2 is running. > Yet, the one with the latest version of cygwin is broken, as you described. > Pretty anoying since this cut&paste function is the #1 kill feature of rxvt. > I might revert to the DOS window to be able to perform cut&paste. > > I also have another new problem with rxvt. Following is the path in the > shortcut I use to start rxvt: > > U:\cygwin\bin\bash.exe --login ~/bin/x50 > > This x50 script calls rxvt with numerous options. A dos window does show up > when called, followed by rxvt. On my machine with the old cygwin, the dos > window dissapear quickly (rxvt is called with & at the end to run in the > background, thus the dos window exits after rxvt is started). On the new > Cygwin, the dos window persist; I must kill it manually. Killing it does > not kill the rxvt though, as it runs in the background. Same > settings/scripts on both machines, but different behaviors. > > > Sincerely, > Hans Deragon -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: Open bash at the current explorer directory?
At 2002-09-19 06:14, you wrote: >John, > >it doesn't work for me. In the second invocation of bash via "exec >bash --noprofile --norc -i'' I don't see my environment variables and >aliases defined in ~/.profile. Did you actually put something in ~/.profile >and verified? > >Thanks, >Frantisek Sorry Frantisek et al, Mea culpa. You are correct. I was not using a .profile at all, thanks for pointing out the problem. I have rearranged things and retested with a .profile. I placed alias profilels1='ls -s' export PROFILE2=ProfileVariable2 export PATH=/cygdrive/c/Temp:$PATH in my .profile in my home directory. My OpenWith.reg file now contains: = File:OpenWith.reg CUT HERE === Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\shell\JddCustom_OpenWithCommandPrompt] @="Open with Command Prompt" [HKEY_CLASSES_ROOT\Directory\shell\JddCustom_OpenWithCommandPrompt\command] @="c:\\WINNT\\system32\\cmd.exe %1" [HKEY_CLASSES_ROOT\Directory\shell\JddCustom_OpenWithCygwinShell] @="Open with Cygwin Shell (rxvt)" [HKEY_CLASSES_ROOT\Directory\shell\JddCustom_OpenWithCygwinShell\command] @="C:\\cygwin\\bin\\rxvt.exe -geometry 96x76+800+5 -fg gray -bg black -fn Fixedsys-8 -sl 2500 -sr -tn cygwin -e c:/cygwin/bin/bash --noprofile --norc -c \"export EXPLORERDIR=`cygpath -u '%1'`; exec bash --login -i\"" [HKEY_CLASSES_ROOT\Drive\shell\JddCustom_OpenWithCommandPrompt] @="Open with Command Prompt" [HKEY_CLASSES_ROOT\Drive\shell\JddCustom_OpenWithCommandPrompt\command] @="c:\\WINNT\\system32\\cmd.exe /F:ON %1" [HKEY_CLASSES_ROOT\Drive\shell\JddCustom_OpenWithCygwinShell] @="Open with Cygwin Shell (rxvt)" [HKEY_CLASSES_ROOT\Drive\shell\JddCustom_OpenWithCygwinShell\command] @="C:\\cygwin\\bin\\rxvt.exe -geometry 96x76+800+5 -fg gray -bg black -fn Fixedsys-8 -sl 2500 -sr -tn cygwin -e c:/cygwin/bin/bash --noprofile --norc -c \"export EXPLORERDIR=`cygpath -u '%1'`; exec bash --login -i\"" == File: OpenWith.reg END CUT HERE= I make the first invocation of bash avoid executing any scripts, then make the second exec invocation run the scripts instead. I don't get any double execution, the PATH variable doesn't get /cygdrive/c/Temp added to it twice, and I get the variables and aliases from both .profile and .bashrc. Notice the new EXPLORERDIR variable. The many quotes are needed for directory names with spaces! I had to add these lines at the very bottom of the global /etc/profile file to get it to change to the directory desired though: if [ "$EXPLORERDIR" ]; then cd "$EXPLORERDIR" fi === John Daniel Doucette, Sr. Software Designer J. J. MacKay Canada Limited Halifax R & D Office 1046 Barrington Street, 1st Floor Halifax, Nova Scotia Canada B3H 2R1 Phone: 902.423.7727 x222 Fax: 902.422.8108 Web:www . jjmackay . ca Email: john . doucette @ jjmackay . ca === -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: rxvt doesn't paste selections anymore?
You sort of helped me by inspiring me to look more closely how I started my script. I solved the dos box persistence. I used to call my script with: U:\cygwin\bin\bash.exe --login ~/bin/x50 & But it should have been: U:\cygwin\bin\bash.exe --login ~/bin/x50 i.e., no & at the end. I do not know why I have put an & there. But cut&paste does not work across rxvts and I have the save version as you have. It seams that for a few fellows, cut&paste does not work while for others it does. cut&paste does work within the same rxvt and in my case, the middle button is used. At home, with WinXP Home, cut&paste works fine across rxvts. At work, with WinNT 4.0, it does not. On another note, I noticed that when shutting down the computer, I am not asked to kill the rxvts zombies running in the background anymore. Remember that even though you would kill all rxvts running, when shutting down the computer, you would be asked to terminate tasks related to rxvt? It seams that this has been fixed. ;) Ciao Hans -Original Message- From: Alistair Grant [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 18, 2002 8:13 PM To: [EMAIL PROTECTED] Cc: Deragon, Hans Subject: Re: rxvt doesn't paste selections anymore? $ rxvt --version Usage v2.7.2 : (XPM,menubar,.Xdefaults) ... $ cygcheck -s ... Cygwin DLL version info: DLL version: 1.3.12 DLL epoch: 19 DLL bad signal mask: 19005 DLL old termios: 5 DLL malloc env: 28 API major: 0 API minor: 54 ... Shift-Left-click pastes fine. I copied the information out of an rxvt terminal (Cygwin updated yesterday). C:\cygwin\bin\rxvt.exe -fn "Lucida Console-12" -sr -bg black -fg grey -sl 1000 -cr red -vb -e bash --login As a shortcut starts fine with the DOS box disappearing quickly. Hope this helps, Alistair. - Original Message - From: "Deragon, Hans" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 19, 2002 1:14 AM Subject: Re: rxvt doesn't paste selections anymore? > Found the same problem. On both of my machines, rxvt 2.7.2 is running. > Yet, the one with the latest version of cygwin is broken, as you described. > Pretty anoying since this cut&paste function is the #1 kill feature of rxvt. > I might revert to the DOS window to be able to perform cut&paste. > > I also have another new problem with rxvt. Following is the path in the > shortcut I use to start rxvt: > > U:\cygwin\bin\bash.exe --login ~/bin/x50 > > This x50 script calls rxvt with numerous options. A dos window does show up > when called, followed by rxvt. On my machine with the old cygwin, the dos > window dissapear quickly (rxvt is called with & at the end to run in the > background, thus the dos window exits after rxvt is started). On the new > Cygwin, the dos window persist; I must kill it manually. Killing it does > not kill the rxvt though, as it runs in the background. Same > settings/scripts on both machines, but different behaviors. > > > Sincerely, > Hans Deragon -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: dumb escaping question when using Cygwin + NT commands
> -Original Message- > From: Randall R Schulz [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 18, 2002 6:30 PM > To: [EMAIL PROTECTED] > Subject: Re: dumb escaping question when using Cygwin + NT commands > > > Scott, > > At 15:15 2002-09-18, Scott Prive wrote: > > >Hello, > > > >I get this odd problem when calling NT commands from Cygwin. I am > >single-quoting the data, but the way I'm doing things > (probably wrong...) > >does not like passing $1 function arguments to NT commands. > If I hardcode > >the arguments internally, everything works. > > > >The two example functions below are intended to behave identical. > > > >#!/bin sh > > > >mount_drive () { > ># Syntax: net 'use' '*' '\\redhat\foo' 'foo' '/user:foo' > >net 'use' 'F:' '\\redhat\foo' 'foo' '/user:foo' > > > >echo "The command returned $?" > >return $?; > >} > > Note that the status ($?) you're returning from the > "mount_drive" shell > procedure is that of the "echo" command, not that printed > _by_ the echo > command. > > The only arguments in this example for which quoting changes the net > argument passed to the underlying command is the one that > includes "redhat" > and the asterisk. The others contain no special characters requiring > quoting or escaping to inhibit special interpretation. > > > >mount_drive2 () { > >net '$1' '$2' '$3' '$4' '$5' > >echo "we saw in mount_drive2: '$1' '$2' '$3' '$4' '$5' " > > > >echo "The command returned $?" > >return $?; > >} > > The same "$?" issue exists here, of course. > > You need to be aware of the difference between 'single > quotes' and "double > quotes." Variable expansion is inhibited in single-quoted > arguments, but > not in double-quoted ones. Furthermore, double quoted > arguments protect > single quotes, making the non-special. So you've probably > confused yourself > into thinking that in this example the "net" command saw the > arguments you > passed to the "mount_drive2" procedure. It did not. It saw > arguments each > consisting of a dollar sign followed by a digit. Then you > echoed a single > argument composed of some fixed text, some single quote marks > and some > expanded positional parameters. Doh! Thanks. A good nights sleep and coffee got me thinking about this on the way to work, and then I read your post. I misled myself because the ECHO command "worked". A debugging habit from Perl is I would print out my variables. Since the echo worked, I never questioned what I was doing with quotes. I assumed quotes controlled how data gets sent to commands, but apparently that's an oversimplification: quotes protect data being sent to a NEW PROCESS.. and builtins like "echo" are NOT a new process (`type echo). This explains why the echo command understood what the heck was inside '$2', but the echo command did not. Of course you know this; I'm just filling in the blanks for the benefit of mailing list and Google searches. For all of last night, I actually believed the problem was due to mixing NT commands and Cygwin. Thanks again. > > > ># > >mount_drive > >mount_drive2 'use' 'G:' '\\redhat\foo' 'foo' '/user:foo' > ># END SCRIPT > > > > > >the output I get from mount_drive2 is standard "usage info", > indicating I > >passed arguments incorrectly. However the debug echo *looks* correct. > > > >Someone please point out my mistake, else I'm doomed to some > ugly hackish > >workarounds ;-) > > > >Thanks, > > > >Scott > > > Randall Schulz > Mountain View, CA USA > > > -- > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > Bug reporting: http://cygwin.com/bugs.html > Documentation: http://cygwin.com/docs.html > FAQ: http://cygwin.com/faq/ > > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
I can't run my make-file
When i write make there is an error... make: cc: Command not found make: *** [universe] Error 127 What can i do to avoid this error? _ På MSN hittar du det roliga, intressanta och användbara på internet: http://www.msn.se -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: dumb escaping question when using Cygwin + NT commands
On Thu, 19 Sep 2002, Scott Prive wrote: > I assumed quotes controlled how data gets sent to commands, but > apparently that's an oversimplification: quotes protect data being sent > to a NEW PROCESS.. and builtins like "echo" are NOT a new process (`type > echo). This explains why the echo command understood what the heck was > inside '$2', but the echo command did not. Not quite. In most shells, the builtin commands are subjected to the same quoting rules as the external commands (there are some exceptions, but I believe echo isn't one of them). What was happening in your case was that on the echo command line, the shell was getting single quotes inside double quotes, and thus treated them as regular characters (expanding the vars within the DOUBLE quotes). When you called your program, on the other hand, the shell was getting the variables in SINGLE quotes only, thus avoiding the expansion. You should have called both echo and net in the same way: net "$1" "$2" "$3" "$4" "$5" echo "we saw in mount_drive2:" "$1" "$2" "$3" "$4" "$5" or, better yet, [ $# -eq 5 ] || (echo "Invalid number of arguments" >&2 && exit 2) net "$@" echo "we saw in mount_drive2: $@" Hope this helps. Igor On Thu, 19 Sep 2002, Scott Prive wrote: > > -Original Message- > > From: Randall R Schulz [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, September 18, 2002 6:30 PM > > To: [EMAIL PROTECTED] > > Subject: Re: dumb escaping question when using Cygwin + NT commands > > > > > > Scott, > > > > At 15:15 2002-09-18, Scott Prive wrote: > > > > >Hello, > > > > > >I get this odd problem when calling NT commands from Cygwin. I am > > >single-quoting the data, but the way I'm doing things > > (probably wrong...) > > >does not like passing $1 function arguments to NT commands. > > If I hardcode > > >the arguments internally, everything works. > > > > > >The two example functions below are intended to behave identical. > > > > > >#!/bin sh > > > > > >mount_drive () { > > ># Syntax: net 'use' '*' '\\redhat\foo' 'foo' '/user:foo' > > >net 'use' 'F:' '\\redhat\foo' 'foo' '/user:foo' > > > > > >echo "The command returned $?" > > >return $?; > > >} > > > > Note that the status ($?) you're returning from the > > "mount_drive" shell > > procedure is that of the "echo" command, not that printed > > _by_ the echo > > command. > > > > The only arguments in this example for which quoting changes the net > > argument passed to the underlying command is the one that > > includes "redhat" > > and the asterisk. The others contain no special characters requiring > > quoting or escaping to inhibit special interpretation. > > > > > > >mount_drive2 () { > > >net '$1' '$2' '$3' '$4' '$5' > > >echo "we saw in mount_drive2: '$1' '$2' '$3' '$4' '$5' " > > > > > >echo "The command returned $?" > > >return $?; > > >} > > > > The same "$?" issue exists here, of course. > > > > You need to be aware of the difference between 'single > > quotes' and "double > > quotes." Variable expansion is inhibited in single-quoted > > arguments, but > > not in double-quoted ones. Furthermore, double quoted > > arguments protect > > single quotes, making the non-special. So you've probably > > confused yourself > > into thinking that in this example the "net" command saw the > > arguments you > > passed to the "mount_drive2" procedure. It did not. It saw > > arguments each > > consisting of a dollar sign followed by a digit. Then you > > echoed a single > > argument composed of some fixed text, some single quote marks > > and some > > expanded positional parameters. > > Doh! > > Thanks. A good nights sleep and coffee got me thinking about this on the > way to work, and then I read your post. > > I misled myself because the ECHO command "worked". A debugging habit > from Perl is I would print out my variables. Since the echo worked, I > never questioned what I was doing with quotes. > > I assumed quotes controlled how data gets sent to commands, but > apparently that's an oversimplification: quotes protect data being sent > to a NEW PROCESS.. and builtins like "echo" are NOT a new process (`type > echo). This explains why the echo command understood what the heck was > inside '$2', but the echo command did not. > > Of course you know this; I'm just filling in the blanks for the benefit > of mailing list and Google searches. For all of last night, I actually > believed the problem was due to mixing NT commands and Cygwin. > > Thanks again. > > > > > > > ># > > >mount_drive > > >mount_drive2 'use' 'G:' '\\redhat\foo' 'foo' '/user:foo' > > ># END SCRIPT > > > > > > > > >the output I get from mount_drive2 is standard "usage info", > > indicating I > > >passed arguments incorrectly. However the debug echo *looks* correct. > > > > > >Someone please point out my mistake, else I'm doomed to some > > ugly hackish > > >workarounds ;-) > > > > > >Thanks, > > > > > >Scott > > > > > > Randall Schulz > > Mountain Vie
Re: ldd.cygwin
Hello Matt, Thursday, September 19, 2002, 10:03:47 AM, you wrote: MS> I have polished up the "ldd" script some more and have posted it at MS>http://www.shore.net/~swift/ldd.cygwin.txt I cannot find it under this address. -- Best regards, Uwe -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: dumb escaping question when using Cygwin + NT commands
Scott, [ This is off-topic for the Cygwin list, since it has nothing to do with Cygwin per se, but I feel the need to correct misconceptions for other newcomers to a Unix / POSIX (-like) environment, so I'm replying to the list, not just Scott. -- Randall ] At 08:12 2002-09-19, Scott Prive wrote: > > -Original Message- >... > >Doh! > >Thanks. A good nights sleep and coffee got me thinking about this on the >way to work, and then I read your post. > >I misled myself because the ECHO command "worked". A debugging habit from >Perl is I would print out my variables. Since the echo worked, I never >questioned what I was doing with quotes. > >I assumed quotes controlled how data gets sent to commands, but apparently >that's an oversimplification: quotes protect data being sent to a NEW >PROCESS.. and builtins like "echo" are NOT a new process (`type echo). >This explains why the echo command understood what the heck was inside >'$2', but the echo command did not. Not quite. The "echo" command printed the values of the positional parameters because the single quotes that immediately surrounded them were rendered into literal characters in the single argument to echo by the use of a pair of double quotes enclosing that whole (single) argument to echo. If you remove those double quotes, you'll see echo printing the $1, $2 (literally). The shell most certainly does not treat built-in and external commands differently as far as argument and I/O redirection (e.g.) are concerned. >Of course you know this; I'm just filling in the blanks for the benefit of >mailing list and Google searches. For all of last night, I actually >believed the problem was due to mixing NT commands and Cygwin. > >Thanks again. You're welcome. Randall Schulz Mountain View, CA USA -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: dumb escaping question when using Cygwin + NT commands
Yes that helped; thanks. > -Original Message- > From: Igor Pechtchanski [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 19, 2002 12:00 PM > To: Scott Prive > Cc: [EMAIL PROTECTED] > Subject: RE: dumb escaping question when using Cygwin + NT commands > > > On Thu, 19 Sep 2002, Scott Prive wrote: > > > I assumed quotes controlled how data gets sent to commands, but > > apparently that's an oversimplification: quotes protect > data being sent > > to a NEW PROCESS.. and builtins like "echo" are NOT a new > process (`type > > echo). This explains why the echo command understood what > the heck was > > inside '$2', but the echo command did not. > > Not quite. In most shells, the builtin commands are > subjected to the same > quoting rules as the external commands (there are some > exceptions, but I > believe echo isn't one of them). What was happening in your > case was that > on the echo command line, the shell was getting single quotes inside > double quotes, and thus treated them as regular characters > (expanding the > vars within the DOUBLE quotes). When you called your program, on the > other hand, the shell was getting the variables in SINGLE quotes only, > thus avoiding the expansion. > > You should have called both echo and net in the same way: > >net "$1" "$2" "$3" "$4" "$5" >echo "we saw in mount_drive2:" "$1" "$2" "$3" "$4" "$5" > > or, better yet, > >[ $# -eq 5 ] || (echo "Invalid number of arguments" >&2 && exit 2) >net "$@" >echo "we saw in mount_drive2: $@" > > Hope this helps. > Igor > > On Thu, 19 Sep 2002, Scott Prive wrote: > > > > -Original Message- > > > From: Randall R Schulz [mailto:[EMAIL PROTECTED]] > > > Sent: Wednesday, September 18, 2002 6:30 PM > > > To: [EMAIL PROTECTED] > > > Subject: Re: dumb escaping question when using Cygwin + > NT commands > > > > > > > > > Scott, > > > > > > At 15:15 2002-09-18, Scott Prive wrote: > > > > > > >Hello, > > > > > > > >I get this odd problem when calling NT commands from Cygwin. I am > > > >single-quoting the data, but the way I'm doing things > > > (probably wrong...) > > > >does not like passing $1 function arguments to NT commands. > > > If I hardcode > > > >the arguments internally, everything works. > > > > > > > >The two example functions below are intended to behave identical. > > > > > > > >#!/bin sh > > > > > > > >mount_drive () { > > > ># Syntax: net 'use' '*' '\\redhat\foo' 'foo' '/user:foo' > > > >net 'use' 'F:' '\\redhat\foo' 'foo' '/user:foo' > > > > > > > >echo "The command returned $?" > > > >return $?; > > > >} > > > > > > Note that the status ($?) you're returning from the > > > "mount_drive" shell > > > procedure is that of the "echo" command, not that printed > > > _by_ the echo > > > command. > > > > > > The only arguments in this example for which quoting > changes the net > > > argument passed to the underlying command is the one that > > > includes "redhat" > > > and the asterisk. The others contain no special > characters requiring > > > quoting or escaping to inhibit special interpretation. > > > > > > > > > >mount_drive2 () { > > > >net '$1' '$2' '$3' '$4' '$5' > > > >echo "we saw in mount_drive2: '$1' '$2' '$3' '$4' '$5' " > > > > > > > >echo "The command returned $?" > > > >return $?; > > > >} > > > > > > The same "$?" issue exists here, of course. > > > > > > You need to be aware of the difference between 'single > > > quotes' and "double > > > quotes." Variable expansion is inhibited in single-quoted > > > arguments, but > > > not in double-quoted ones. Furthermore, double quoted > > > arguments protect > > > single quotes, making the non-special. So you've probably > > > confused yourself > > > into thinking that in this example the "net" command saw the > > > arguments you > > > passed to the "mount_drive2" procedure. It did not. It saw > > > arguments each > > > consisting of a dollar sign followed by a digit. Then you > > > echoed a single > > > argument composed of some fixed text, some single quote marks > > > and some > > > expanded positional parameters. > > > > Doh! > > > > Thanks. A good nights sleep and coffee got me thinking > about this on the > > way to work, and then I read your post. > > > > I misled myself because the ECHO command "worked". A debugging habit > > from Perl is I would print out my variables. Since the echo > worked, I > > never questioned what I was doing with quotes. > > > > I assumed quotes controlled how data gets sent to commands, but > > apparently that's an oversimplification: quotes protect > data being sent > > to a NEW PROCESS.. and builtins like "echo" are NOT a new > process (`type > > echo). This explains why the echo command understood what > the heck was > > inside '$2', but the echo command did not. > > > > Of course you know this; I'm just filling in the blanks for > the benefit > > of mailing list and Google searches. For all of last night, > I actually >
Re: PHP Apache module with PostgreSQL support
> > The error about crypt doesn't appear any more just lines complaining > > undefined references to the xml extension. > > ... > > It won't work with the flag -lxml. What flag should I specify instead? > > I don't actually know -- I'm not into PHP -- but on a guess you might try > installing "expat" from the Libs section and using -lexpat. That's the > "standard" XML library, AFAIK. It doesn't work. The same output occurs like without the -lexpat flag. The expat package (1.95.4-1) was installed with Cygwin's setup.exe. There's no libexpat.dll (but a (/usr/bin/)cygexpat-0.dll)... Does it require to rerun configure (with the provided --with-expat-dir option)? ... configure:73895: checking whether to enable XML support configure:73934: result: yes configure:73944: checking external libexpat install dir configure:73984: result: no configure:74689: checking for XMLRPC-EPI support configure:74729: result: no configure:74739: checking libexpat dir for XMLRPC-EPI configure:74779: result: no configure:77862: checking whether to enable xslt support configure:77901: result: no configure:77911: checking for XSLT Sablotron backend configure:77951: result: no configure:77961: checking libexpat dir for Sablotron XSL support configure:78001: result: no ... Output with configure option --with-expat-dir: ... checking external libexpat install dir... yes configure: error: not found. Please reinstall the expat distribution. Should I do this by using setup.exe or... Following files are available: /lib/libexpat.a /lib/libexpat.dll.a /lib/libexpat.la /usr/include/expat.h /usr/bin/cygexpat-0.dll /bin/xmlwf.exe Regards, Andreas -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: I can't run my make-file
On Thu, 19 Sep 2002 15:44:57 + melba selco <[EMAIL PROTECTED]> wrote: > When i write > make Arguments to 'make' are targets, not files. Run `make --help` for a short help, `info make` for the full details. > there is an error... > > make: cc: Command not found > make: *** [universe] Error 127 > > What can i do to avoid this error? Install cc? Use a makefile that uses gcc or g++? -- Mac :}) ** I normally forward private questions to the appropriate mail list. ** Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html Give a hobbit a fish and he eats fish for a day. Give a hobbit a ring and he eats fish for an age. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: Open bash at the current explorer directory?
I must be missing something. I added the registry entries plus the profile entries, both for /etc/.profile and ~/.profile. Now, the right-button menu command "Open with command prompt" works just wonderfully (if the resulting cmd.exe window can actually be described with that word), but "Open with Cygwin shell (rxvt)" just gets me an error window showing (in the title bar) the path of the folder I tried to use, and the error message "This file does not have a program associated with it for performing this action. Create an association in the Folder Options control panel." (By the way, when John's message says .profile I assume he means .bash_profile since the registry mods invoke bash? Out of sheer ignorance (I'm not a unix or shell weenie at all) I just added the .profile stuff to both files.) John Doucette wrote: > Sorry Frantisek et al, > > Mea culpa. You are correct. I was not using a .profile at all, thanks for > pointing out the problem. I have rearranged things and retested with a > .profile. I placed > > (etc) -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: ldd.cygwin
Amazing -- I tested it a dozen times, but I must have deleted it. It's there now, and I won't touch it again! Thanks for the heads-up. http://www.shore.net/~swift/ldd.cygwin.txt (You get redirected to http://www2.primushost.com/~swift/ldd.cygwin.txt which is the same thing.) >> "U" == Uwe wrote: U> Hello Matt, U> Thursday, September 19, 2002, 10:03:47 AM, you wrote: MS> I have polished up the "ldd" script some more and have posted it at MS> http://www.shore.net/~swift/ldd.cygwin.txt U> I cannot find it under this address. U> -- U> Best regards, U> Uwe -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: Open bash at the current explorer directory?
Galen, It should be /etc/profile (note the absense of ".") and ~/.bash_profile. I think ~/.profile is used by ksh... Igor On Thu, 19 Sep 2002, Tackett, Galen wrote: > I must be missing something. > > I added the registry entries plus the profile entries, both for > /etc/.profile and ~/.profile. > > Now, the right-button menu command "Open with command prompt" works just > wonderfully (if the resulting cmd.exe window can actually be described with > that word), but "Open with Cygwin shell (rxvt)" just gets me an error window > showing (in the title bar) the path of the folder I tried to use, and the > error message "This file does not have a program associated with it for > performing this action. Create an association in the Folder Options control > panel." > > (By the way, when John's message says .profile I assume he means > .bash_profile since the registry mods invoke bash? Out of sheer ignorance > (I'm not a unix or shell weenie at all) I just added the .profile stuff to > both files.) > > John Doucette wrote: > > > Sorry Frantisek et al, > > > > Mea culpa. You are correct. I was not using a .profile at all, thanks for > > > pointing out the problem. I have rearranged things and retested with a > > .profile. I placed > > > > (etc) -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "Water molecules expand as they grow warmer" (C) Popular Science, Oct'02, p.51 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Building SpamAssassin for Cygwin
I noticed that a couple of people on the list seem to have managed to get SpamAssassin running on Cygwin. I am trying to build SA-2.41 (on Win 98) but I'm encountering a problem. I tried the SA mailing list but mostly I got blank looks (their list-archives only have something relating to a previous version, and which does not apply to the error I am getting). perl Makefile.PL seems to go okay, but the make process then fails as follows: make -f binaries.mk spamd/spamc make[1]: Entering directory /home/eye/develop/Mail-SpamAssassin-2.41' gcc -g -O2 spamd/spamc.c spamd/libspamc.c spamd/utils.c \ -o spamd/spamc make[1]: Leaving directory /home/eye/develop/Mail-SpamAssassin-2.41' cp spamd/spamc blib/script/spamc /usr/bin/perl -I/usr/lib/perl5/5.6.1/cygwin-multi -I/usr/lib/perl5/5.6.1 -MExtUtils::MakeMaker -e "MY->fixin(shift)" blib/script/spamc Can't process 'blib/script/spamc': No such file or directory at -e line 1 make: *** [blib/script/spamc] Error 255 $ ls -la blib/script total 60 drwxr-xr-x2 eye users 0 Sep 18 12:38 . drwxr-xr-x7 eye users 0 Sep 18 12:34 .. -rw-r--r--1 eye users 0 Aug 22 2001 .exists -rwxr-xr-x1 eye users 61206 Sep 18 12:38 spamc.exe What I think is happening is that the .exe suffix is being added to the binary (I'm assuming this is one of the executable files), but something then can't find the executable file as a result. The /usr/bin/perl line, correct? Can anyone who has got it working give me a few clues please? perl is v5.6.1, if it makes any diff. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
df --local
I am trying to write a script that checks the % free of local drives using df. $ df -a Filesystem 1k-blocks Used Available Use% Mounted on C:\cygwin\bin 19936633 5750854 14185779 29% /usr/bin c:\cygwin\lib 19936633 5750854 14185779 29% /usr/lib \\server1\rob 961282048 850460672 110821376 89% /rob c:\cygwin 19936633 5750854 14185779 29% / c:19936633 5750854 14185779 29% /cygdrive/c d: 544324544324 0 100% /cygdrive/d u: 961282048 850460672 110821376 89% /cygdrive/u The problem is that when I run df --local, I only see remotely mounted filesystem: $ df --local Filesystem 1k-blocks Used Available Use% Mounted on \\server1\rob 961282048 850460672 110821376 89% /rob Is this a bug? It seems to be opposite of what you would expect. Also, is there a way to exclude the CDrom drive from the script, since it will always show 100%? -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: Open bash at the current explorer directory?
On Thu, 19 Sep 2002 13:01:33 -0400 (EDT) Igor Pechtchanski <[EMAIL PROTECTED]> wrote: > It should be /etc/profile (note the absense of ".") and ~/.bash_profile. > I think ~/.profile is used by ksh... For login shells, bash will fall back to ~/.profile if ~/.bash_profile and ~/.bash_login aren't present; they shouldn't have to be specifically mentioned. I gleaned what I think are the best command lines from the extensive discussion on this list about 6 months ago. I have posted the .reg file I use to install them at http://home.ix.netcom.com/~mchase/zip/ . They execute ~/.bashrc twice, but /etc/profile and ~/.bash_profile only once. No modification is required to any profile or rc script. -- Mac :}) ** I normally forward private questions to the appropriate mail list. ** Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html Give a hobbit a fish and he eats fish for a day. Give a hobbit a ring and he eats fish for an age. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Download problems due to GNU bc package?
Hello, A search of the cygwin archives for August and September didn't show any mention of this, but I recently noticed that if one attempts to download the Cygwin distribution (for local installs) and includes the GNU bc package, only a small percentage of the available packages are actually retrieved; uninstalling or avoiding bc seems to solve this issue. Fin- ding the correct "culprit" occurred when I attempted to install directly from the mirror sites (several, in fact), and it immediately failed at the GNU bc install, causing the whole setup program to abort. Is this a known issue? It seems to affect every mirror site I've tried. I don't know if anyone else is having this problem, but it could be very frustrating for those for which this is also occurring... (Please note, I'm not subscribed to the list, but I felt that if this is a real issue, it should probably be made known if it already hasn't been noticed.) Ken Lareau [EMAIL PROTECTED] -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: df --local
On Thu, 19 Sep 2002, Rob Brown wrote: > I am trying to write a script that checks the % free of local drives using > df. > > $ df -a > Filesystem 1k-blocks Used Available Use% Mounted on > C:\cygwin\bin 19936633 5750854 14185779 29% /usr/bin > c:\cygwin\lib 19936633 5750854 14185779 29% /usr/lib > \\server1\rob 961282048 850460672 110821376 89% /rob > c:\cygwin 19936633 5750854 14185779 29% / > c:19936633 5750854 14185779 29% /cygdrive/c > d: 544324544324 0 100% /cygdrive/d > u: 961282048 850460672 110821376 89% /cygdrive/u > > The problem is that when I run df --local, I only see remotely mounted > filesystem: > $ df --local > Filesystem 1k-blocks Used Available Use% Mounted on > \\server1\rob 961282048 850460672 110821376 89% /rob > > Is this a bug? It seems to be opposite of what you would expect. > > Also, is there a way to exclude the CDrom drive from the script, since it > will always show 100%? Rob, Yes, this is a porting bug in the fileutils package. The culprit is this line (lib/mountlist.h:49): # define ME_REMOTE(fs_name, fs_type) (strchr (fs_name, ':') != 0) which has the exact opposite meaning on Cygwin. On Cygwin, paths with ":" are local, of the form "C:\...", whereas paths without ":", of the form "\\machine\path" are remote. On Unix systems, local paths have the form "/dir1/dir2/...", and remote ones are "machine:/dir1/dir2/...". Hope this helps. If I have enough time in the next few days, I'll figure out the proper way to fix this and submit a patch. A quick workaround would be == --- mountlist.h 2002-09-19 14:34:31.0 -0400 +++ mountlist.h-orig 2000-06-02 07:20:04.0 -0400 @@ -46,9 +46,5 @@ struct mount_entry *read_filesystem_list #endif #ifndef ME_REMOTE -# ifdef __CYGWIN__ -# define ME_REMOTE(fs_name, fs_type) (strchr (fs_name, ':') == 0) -# else # define ME_REMOTE(fs_name, fs_type) (strchr (fs_name, ':') != 0) -# endif #endif == but this strikes me as a source of potential problems, and probably shouldn't be used as a final fix. Perhaps the maintainer of filetutils could look into it? Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "Water molecules expand as they grow warmer" (C) Popular Science, Oct'02, p.51 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: Download problems due to GNU bc package?
Works for me. > -Original Message- > From: Kenneth Lareau [mailto:[EMAIL PROTECTED]] > Sent: Thu, September 19, 2002 8:33 PM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Download problems due to GNU bc package? > > > Hello, > > A search of the cygwin archives for August and September > didn't show any > mention of this, but I recently noticed that if one attempts > to download > the Cygwin distribution (for local installs) and includes the GNU bc > package, only a small percentage of the available packages > are actually > retrieved; uninstalling or avoiding bc seems to solve this > issue. Fin- > ding the correct "culprit" occurred when I attempted to > install directly > from the mirror sites (several, in fact), and it immediately failed at > the GNU bc install, causing the whole setup program to abort. > > Is this a known issue? It seems to affect every mirror site > I've tried. > I don't know if anyone else is having this problem, but it > could be very > frustrating for those for which this is also occurring... > > (Please note, I'm not subscribed to the list, but I felt that > if this is > a real issue, it should probably be made known if it already > hasn't been > noticed.) > > > Ken Lareau > [EMAIL PROTECTED] > > -- > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > Bug reporting: http://cygwin.com/bugs.html > Documentation: http://cygwin.com/docs.html > FAQ: http://cygwin.com/faq/ > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Out of Office AutoReply: Darling
Sorry, my e-mail address has changed. Please checkout the following link http://www.utoronto.ca/mailboxsearch.html to find out about my new address. I am sorry for this inconvenience, but I do recieve more than 100 spam mails a day -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Hey, I found a site all about acid!
Hey I found this site all about LSD25. Its such a cool site I just had to share it. Sorry if you did not want this e-mail, it wont happen again by me. Anywayz the site has all kinds of information about the drug and things to look at and do while on it! Also it has tons of music, videos, t-shirts, posters, books, and all kinds of stuff for sale at very good prices. Even if you dont like drugs the site is worth taking a look at. http://acidtrip.tk is the site url. I hope you enjoy the site as much as i did! -Pyro -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: Out of Office AutoReply: Darling
On Thu, Sep 19, 2002 at 10:33:39PM +0200, Wortmann, Ulrich Georg wrote: >Sorry, my e-mail address has changed. Good, so you won't mind if I block this email address then. Idiot. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: Out of Office AutoReply: Darling
On Thu, Sep 19, 2002 at 06:24:42PM -0400, Christopher Faylor wrote: >On Thu, Sep 19, 2002 at 10:33:39PM +0200, Wortmann, Ulrich Georg wrote: >>Sorry, my e-mail address has changed. > >Good, so you won't mind if I block this email address then. > >Idiot. Actually, now that I think of it, this person was probably just replying to some virus email or something. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: df --local
Igor Pechtchanski wrote: > -# ifdef __CYGWIN__ > -# define ME_REMOTE(fs_name, fs_type) (strchr (fs_name, ':') == 0) > -# else > # define ME_REMOTE(fs_name, fs_type) (strchr (fs_name, ':') != 0) > -# endif You're sure it's not possible to end up with a local path without a ":" (e.g. just \windows\system32, etc.) in the mount table? I'm not sure what this would mean, but as long as it's not possible to get such an entry in using the usual API, this check should be OK. -- Shankar. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
new files have bogus owner
When I create a new file, it gives the file a bogus value for the owner: ~/tmp $ whoami perry ~/tmp $ echo asdf > asdf ~/tmp $ ls -l total 1 -rw-rw-rw-1 1119 None5 Sep 19 17:36 asdf ~/tmp $ grep 1119 /etc/passwd ~/tmp $ Shouldn't the file owner be perry? What the hell is 1119? Does anyone know why this is happening? The cygwin install is fresh off cywin.com and is dated July 6, 2002. Thanks, Jeff -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: MMap offset parameter failing with ENOMEM error
Corinna, I noticed this while I continued testing last night. Interestingly Linux and SunOS don't seem to be bothered by this, however, if you read the IEEE standard: http://www.opengroup.org/onlinepubs/007904975/functions/mmap.html there is the following quote: "The range of bytes starting at off and continuing for len bytes shall be legitimate for the possible (not necessarily current) offsets in the file, shared memory object, or [TYM] typed memory object represented by fildes." Linux and Sun seem to allow it and return '0' if you access memory beyond the EOF, go figure. Perhaps the wrong error is being returned for this case - I would have thought the following error code would be more appropriate: [ENXIO] Addresses in the range [off,off+len) are invalid for the object specified by fildes. I have since amended the code by replacing the following line: size = finfo.st_size; with size = finfo.st_size - foff; and I still get the same error. There is some example output below: Note: index.idx is a file with a size of 557592 bytes. In the output below it worked for an offset of 40 and created a map of 157592 bytes - but failed for the same file with an offset of 30 and a potential map of 257592 bytes. Run 1) ~/c>./a.exe 40 index.idx Offset is 40 File index.idx opened on descriptor 3. It is 157592 bytes long --- Syspagesize 4096, pagemask F000, offmask FFF foff is 40 --- Syspagesize 4096, pagemask F000, offmask FFF pfoff is 397312 Vars just before mmap call psyz = 163840 prot = 1 fd = 3 pfoff = 397312 Mapping 163840 at 2A231000 <---> 397312 (mapping fh Result from femmap is 2A231A80 Byte is 127 Run 2) ~/c>./a.exe 30 index.idx Offset is 30 File index.idx opened on descriptor 3. It is 257592 bytes long --- Syspagesize 4096, pagemask F000, offmask FFF foff is 30 --- Syspagesize 4096, pagemask F000, offmask FFF pfoff is 299008 Vars just before mmap call psyz = 262144 prot = 1 fd = 3 pfoff = 299008 perror reports errno of 12 Mapping 262144 at <---> 299008 (mapping fh Any ideas? Cheers, Shane Shane Mann Software Engineer Phone: +61-7-3259-2223 LeadUp Software Pty LtdFax: +61-7-3259-2259 339 Coronation Drive, Email: [EMAIL PROTECTED] Milton, QLD, 4064 Web: http://www.leadup.com.au > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf > Of Corinna Vinschen > Sent: Thursday, 19 September 2002 17:33 > To: Cygwin@Cygwin. Com > Subject: Re: MMap offset parameter failing with ENOMEM error > > > On Thu, Sep 19, 2002 at 12:19:06PM +1000, Shane Mann wrote: > > Hi, > > > > I am having trouble with mmap using the last 'offset' parameter. I have > > attached a small piece of code (and sample file) which demonstrates the > > problem. Basically if the offset parameter is passed as a > variable to mmap > > then the call fails with an ENOMEM error. But if you pass 0 as > the parameter > > and then access the return address from mmap + offset - it is fine. My > > question: is mmap handling the offset parameter correctly? > > > > Usage for the program: > > > > ./a.exe eg: ./a.exe 11200 index.idx > > > > To see the address + offset work, comment out the first mmap > call and return > > statement and uncomment the lines below each one. > > > > Any help appreciated. > > Your application tries to mmap over EOF. > > Corinna > > -- > Corinna Vinschen Please, send mails regarding Cygwin to > Cygwin Developermailto:[EMAIL PROTECTED] > Red Hat, Inc. > > -- > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > Bug reporting: http://cygwin.com/bugs.html > Documentation: http://cygwin.com/docs.html > FAQ: http://cygwin.com/faq/ > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Why rxvt?
Can anyone tell me what advantages this might have for running bash, compared to the usual Windows command line window? I noticed in the readme that rxvt can leave child processes running if you close the window, which is scary since that's how I habitually terminate a command line session. -- Ciao, Paul D. DeRocco Paulmailto:[EMAIL PROTECTED] -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: Fw: Telnet Script?
Alistair: I have been able to write cygwin expect scripts to telnet to remote boxes running the cygwin telnetd and then subsequently invoke bash scripts. I did this to work around the in-ability to map network drives under cron (cron calls the expect script that telnets in to launch the bash script :->). I can e-mail you an example ;let me know. -- regards, Tom Rodman perl -e 'print unpack("u", "\.\=\$\!T\Daniel wrote: >> Start the script in Cygwin on my machine. Change the password for my user, >> then subsequently telnet into another machine, and then change the >password >> for the account that I use on that machine. I have ideas of how to manage >> the passwords for whatever machine is current, but I am wondering if there >> is a way to control things based on what a user might see, but through an >> automated script. Does anyone have an example of how this could be done? >Or >> does someone have a suggestion of where to find information on this? > > >I haven't used it, however take a look at the "expect" package. It's >purpose is to script the input to other interactive programs. > >Hope this helps, > >Alistair. > > >-- >Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple >Bug reporting: http://cygwin.com/bugs.html >Documentation: http://cygwin.com/docs.html >FAQ: http://cygwin.com/faq/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: df --local
On Thu, 19 Sep 2002, Shankar Unni wrote: > Igor Pechtchanski wrote: > > -# ifdef __CYGWIN__ > > -# define ME_REMOTE(fs_name, fs_type) (strchr (fs_name, ':') == 0) > > -# else > > # define ME_REMOTE(fs_name, fs_type) (strchr (fs_name, ':') != 0) > > -# endif > > You're sure it's not possible to end up with a local path without a ":" > (e.g. just \windows\system32, etc.) in the mount table? I'm not sure > what this would mean, but as long as it's not possible to get such an > entry in using the usual API, this check should be OK. You are quite correct. It is possible to get entries with no drive letter into the mount table, and they will even work (sort of). However, ISTR a discussion a month or so ago about the woes of doing this sort of thing, e.g., switching to another drive and trying to access such mounts, so I suppose we should just consider these mounts invalid, anyway... BTW, I noticed that I accidentally reversed the patch. Sorry. However, patch should be smart enough to detect this. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "Water molecules expand as they grow warmer" (C) Popular Science, Oct'02, p.51 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: Why rxvt?
On Thu, 19 Sep 2002 17:17:45 -0700 "Paul D. DeRocco" <[EMAIL PROTECTED]> wrote: > Can anyone tell me what advantages this might have for running bash, > compared to the usual Windows command line window? I noticed in the readme > that rxvt can leave child processes running if you close the window, which > is scary since that's how I habitually terminate a command line session. Don't do that. It's best to shut down any program as gracefully as it can. For command line windows, that is by using the appropriate exit command. Rxvt you gives better control over the window, especially in Win9x, keyboard, cut-and-paste, scrollbars, resizing, fonts, and colors in particular. In WinNT and it's descendents, I've been perfectly happy using the console window though in WinXP I've found it useful to call bash.exe directly rather than via cygwin.bat to avoid having cmd.exe respond on exit to any Ctrl-C's I've pressed during the session. -- Mac :}) ** I normally forward private questions to the appropriate mail list. ** Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html Give a hobbit a fish and he eats fish for a day. Give a hobbit a ring and he eats fish for an age. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: I can't run my make-file
On Thursday 19 September 2002 08:44, melba selco wrote: > When i write > make > > there is an error... > > make: cc: Command not found > Install gcc and symlink it to cc, or fix the makefile. -- Tim Prince -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/