Re: sshd w/o admin?

2009-02-19 Thread Corinna Vinschen
On Feb 19 10:50, Aaron Davies wrote:
> I tried moving all my keys aside (outside of ~/.ssh). Now "ssh
> localhost" on the local box takes my password, prints the banner, then
> quits with "Connection to localhost closed."
> 
> % ssh localhost
> adav...@localhost's password:
> Last login: Thu Feb 19 10:41:39 2009 from localhost
> Connection to localhost closed.
> 
> The same setreuid error is left in the event log
> 
> Why exactly does it need to setreuid to me when it's already me? This
> sshd process is started by and running under the same id it's trying
> to become.

That's due to the way password authentication works.  If you use
password authentication, a new user token is created under the hood.
When seteuid is called, it tries to use the user token, but it can't
because switching the user context requires a special user privilege
(SeImpersonatePrivilege, "Impersonate a client after authentication"),
which only Administrators and Services have by default.

Usually you simply use public key authentication.  Be sure that
all sshd related files belong to you:

  $ chown YOU /var/empty /etc/ssh*

Append your public key to your authorized_keys file:

  $ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

For testing, start sshd in debug mode from one console window:

  $ /usr/sbin/sshd -d

And start a session in another console:

  $ ssh localhost

This works fine for me.  If you start sshd in a running GUI session
as above, you also won't have problems with network drives.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Installation problem - "unix" root doesn't work

2009-02-19 Thread Michel Wozniak
Hi,

I couldn't find the answer to this question neither on the FAQ, nor on
the lists...

I make a standard clean install of CygWin (last setup.exe on the web
site) on my Win2K computer (beforehand, I clean old cygwin folder, I
clean the reg entries, and I clean all the links).

I tried the install for All users, as well as for "this user only".

I'm admin of the computer, and I try to install in C:\cygwin

After each try to install, when I start cygwin (bash --login -i), and
type pwd, I get :
bash-3.2$ pwd
/cygdrive/c/cygwin/bin

If I type "cd /" and then "ls", I get the root of my C drive...

The cygwin setup.log is ok except for the post-install (which is
obvious when you see that bash doesn't base on the "unix" root) :
   2009/02/19 11:09:29 running: C:\cygwin\bin\bash.exe -c
/etc/postinstall/update-info-
dir.sh
   2009/02/19 11:09:34 abnormal exit: exit code=127
   2009/02/19 11:09:34 running: C:\cygwin\bin\bash.exe -c
/etc/postinstall/coreutils.sh
   2009/02/19 11:09:34 abnormal exit: exit code=127
   2009/02/19 11:09:34 running: C:\cygwin\bin\bash.exe -c
/etc/postinstall/terminfo.sh
   2009/02/19 11:09:34 abnormal exit: exit code=127
   ...

I have no idea why the install doesn't work.

CygCheck -s -v -r gives me :



Cygwin Configuration Diagnostics
Current System Time: Thu Feb 19 11:13:08 2009

Windows 2000 Professional Ver 5.0 Build 2195 Service Pack 4

Path:C:\Documents and Settings\j630464\Desktop\PSA\SVG\Scripts
C:\SYS\WINDOWS\system32
C:\SYS\WINDOWS
C:\SYS\WINDOWS\System32\Wbem
c:\sys\ora8i\bin
C:\Program Files\QuickTime\QTSystem\
C:\Perl\bin\
C:\Program Files\IBM\SQLLIB\BIN
C:\Program Files\IBM\SQLLIB\FUNCTION
C:\Program Files\cvs
C:\JIP\bin\maven\bin
.
c:\user\globe\derby\bin
c:\Program Files\Hewlett-Packard\IAM\bin
C:\Sys\Pcom\
C:\Program Files\IBM\Trace Facility\
C:\SYNC\OUTILS\php
C:\SYNC\OUTILS\Unix like
C:\Program Files\MySQL\MySQL Server 5.0\bin

Output from C:\cygwin\bin\id.exe (nontsec)
UID: 400(J630464)  GID: 401(mkpasswd)
401(mkpasswd)

Output from C:\cygwin\bin\id.exe (ntsec)
UID: 400(J630464)  GID: 401(mkpasswd)
401(mkpasswd)

SysDir: C:\SYS\WINDOWS\system32
WinDir: C:\SYS\WINDOWS

PWD = '/cygdrive/c/cygwin/bin'
HOME = '/cygdrive/c'

HOMEPATH = '\'
DB2INSTANCE = 'DB2'
APPDATA = 'C:\Documents and Settings\j630464\Application Data'
TERM = 'cygwin'
PROCESSOR_IDENTIFIER = 'x86 Family 6 Model 15 Stepping 11, GenuineIntel'
WINDIR = 'C:\SYS\WINDOWS'
VS80COMNTOOLS = 'C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\'
DB2TEMPDIR = 'C:\Program Files\IBM\SQLLIB'
DERBY_HOME = 'C:\user\globe\derby'
GS_LIB = 'c:\Program Files\PDFCreator\GS8.54\gs8.54\lib'
USERDOMAIN = 'INETPSA'
OS = 'Windows_NT'
ALLUSERSPROFILE = 'C:\Documents and Settings\All Users'
OS2LIBPATH = 'C:\SYS\WINDOWS\system32\os2\dll;'
ARISHOME70 = 'C:\Program Files\ARIS7.0'
TEMP = '/cygdrive/c/DOCUME~1/j630464/LOCALS~1/Temp'
COMMONPROGRAMFILES = 'C:\Program Files\Common Files'
QTJAVA = 'C:\Program Files\Java\jre1.5.0_11\lib\ext\QTJava.zip'
USERNAME = 'J630464'
GS_PROG = 'c:\Program Files\PDFCreator\GS8.54\gs8.54\bin\gswin32.exe'
MAVEN_OPTS = '-Dfile.encoding=cp1252 -Xmx128m'
PROCESSOR_LEVEL = '6'
SYSTEMDRIVE = 'C:'
M2_JAVA_HOME = 'C:\JIP\bin\jdk1.5.0_12_off'
JAVA_HOME = 'C:\j2sdk1.4.2_10'
GS_DLL = 'c:\Program Files\PDFCreator\GS8.54\gs8.54\bin\gsdll32.dll'
USERPROFILE = 'C:\Documents and Settings\j630464'
LOGONSERVER = '\\BEE604'
PROCESSOR_ARCHITECTURE = 'x86'
!C: = 'C:\cygwin\bin'
SHLVL = '1'
M2_HOME = 'C:\JIP\bin\maven'
USERDNSDOMAIN = 'inetpsa.com'
PATHEXT = '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
HOMEDRIVE = 'C:'
PROMPT = '$P$G'
COMSPEC = 'C:\SYS\WINDOWS\system32\cmd.exe'
TMP = '/cygdrive/c/DOCUME~1/j630464/LOCALS~1/Temp'
SYSTEMROOT = 'C:\SYS\WINDOWS'
PROCESSOR_REVISION = '0f0b'
CLASSPATH = '.;C:\Program Files\IBM\SQLLIB\java\db2java.zip;C:\Program
Files\IBM\SQLLIB\java\db2jcc.jar;C:\Program
Files\IBM\SQLLIB\java\db2jcc_license_cisuz.jar;C:\Program
Files\IBM\SQLLIB\java\db2jcc_license_cu.jar;C:\Program
Files\IBM\SQLLIB\BIN'
PROGRAMFILES = 'C:\Program Files'
NOLGS = 'NOLGS'
NUMBER_OF_PROCESSORS = '1'
INCLUDE = 'C:\Program Files\IBM\SQLLIB\lib'
COMPUTERNAME = 'B680844'
PCOMM_ROOT = 'C:\Sys\Pcom\'
_ = './cygcheck'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
  (default) = '/cygdrive'
  cygdrive flags = 0x0022
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/
  (default) = 'C:\cygwin'
  flags = 0x0002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
  (default) = 'C:\cygwin/bin'
  flags = 0x0002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
  (default) = 'C:\cygwin/lib'
  flags = 0x0002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwi

Re: SSH/SCREEN/REATTACH bug

2009-02-19 Thread Corinna Vinschen
On Feb 18 09:26, Andrew Schulman wrote:
> > sorry to inform you, using "Cygwin 1.7" yields the same result.
> 
> OK, too bad.
> 
> > Can't wait to see the recompile using pipes!
> 
> I recompiled it yesterday in 1.7, and the configure script still found a
> "broken" fifo implementation, but in a gentler way than in 1.5 (without a 
> nasty
> hang).  So I'll report this as a Cygwin bug and see if it can get fixed.

Andrew, can you give us a bit more detail than just this micro snippet
of information?

What about providing details about the failing test done in screen's
configure...

What about extracting the code from configure and test it standalone...

What about maybe using strace and/or GDB on it to find out a bit more...

What about providing the standalone test to us eventually with
instructions how to reproduce the problem and maybe some of the
information you got by using strace/GDB...

...instead of just leaving everything except of the bare information "it
doesn't work" to the Cygwin developers?  As much as we like to get rid
of bugs in Cygwin, we have a life beyond Cygwin, too.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Installation problem - "unix" root doesn't work

2009-02-19 Thread Dave Korn
Michel Wozniak wrote:

> Path:  

> C:\SYNC\OUTILS\php
> C:\SYNC\OUTILS\Unix like

> Not Found: awk
> Not Found: bash
> Not Found: cat
> Found: C:\SYNC\OUTILS\Unix like\cp.exe
> Not Found: cpp (good!)
> Not Found: crontab
> Found: C:\SYNC\OUTILS\Unix like\find.exe
> Not Found: gcc
> Not Found: gdb
> Found: C:\SYNC\OUTILS\Unix like\grep.exe
> Not Found: kill
> Not Found: ld
> Found: C:\SYNC\OUTILS\Unix like\ls.exe
> Not Found: make
> Found: C:\SYNC\OUTILS\Unix like\mv.exe
> Not Found: patch
> Found: C:\Perl\bin\perl.exe
> Found: C:\SYNC\OUTILS\Unix like\rm.exe
> Found: C:\SYNC\OUTILS\Unix like\sed.exe
> Not Found: ssh
> Not Found: sh
> Found: C:\SYNC\OUTILS\Unix like\tar.exe
> Not Found: test
> Not Found: vi
> Not Found: vim


  All those utilities in the unix-alike directory in your PATH have got in the
way and messed up the postinstall scripts is my guess.  Remove those OUTILS
dirs from your path and re-run setup; just click right through on "install
from local dir", set everything at the top level of the package category tree
to "reinstall" and it should complete whatever it didn't finish last time.

cheers,
  DaveK

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Installation problem - "unix" root doesn't work

2009-02-19 Thread Michel Wozniak
Hi Dave,

Thanks for the answer.

First, I tried to erase the former erroneous installation of Cygwin. I
cleaned the registry.
So, I cleaned all the entries you asked from the user and system PATH
env, and I relaunched an installation.

The result is the same.
In the setup.log, all the postinstalls give :
   2009/02/19 13:03:06 running: C:\cygwin\bin\bash.exe -c
/etc/postinstall/passwd-grp.sh
   2009/02/19 13:03:06 abnormal exit: exit code=127

If you launch it manually, you get :
  C:\cygfiles>C:\cygwin\bin\bash.exe -c /etc/postinstall/update-info-dir.sh
  /cygdrive/c/cygwin/bin/bash: /etc/postinstall/update-info-dir.sh: No
such file or directory

The cygcheck -s -r -v gives :

Cygwin Configuration Diagnostics
Current System Time: Thu Feb 19 13:12:56 2009

Windows 2000 Professional Ver 5.0 Build 2195 Service Pack 4

Path:   C:\Documents and Settings\j630464\Desktop\PSA\SVG\Scripts
C:\SYS\WINDOWS\system32
C:\SYS\WINDOWS
C:\SYS\WINDOWS\System32\Wbem
c:\sys\ora8i\bin
C:\Program Files\QuickTime\QTSystem\
C:\Perl\bin\
C:\Program Files\IBM\SQLLIB\BIN
C:\Program Files\IBM\SQLLIB\FUNCTION
C:\Program Files\cvs
C:\JIP\bin\maven\bin
.
c:\user\globe\derby\bin
c:\Program Files\Hewlett-Packard\IAM\bin
C:\Sys\Pcom\
C:\Program Files\IBM\Trace Facility\
C:\SYNC\OUTILS\php
C:\Program Files\MySQL\MySQL Server 5.0\bin

Output from C:\cygwin\bin\id.exe (nontsec)
UID: 400(J630464)  GID: 401(mkpasswd)
401(mkpasswd)

Output from C:\cygwin\bin\id.exe (ntsec)
UID: 400(J630464)  GID: 401(mkpasswd)
401(mkpasswd)

SysDir: C:\SYS\WINDOWS\system32
WinDir: C:\SYS\WINDOWS

PWD = '/cygdrive/c/cygwin/bin'
HOME = '/cygdrive/c'

HOMEPATH = '\'
DB2INSTANCE = 'DB2'
APPDATA = 'C:\Documents and Settings\j630464\Application Data'
TERM = 'cygwin'
PROCESSOR_IDENTIFIER = 'x86 Family 6 Model 15 Stepping 11, GenuineIntel'
WINDIR = 'C:\SYS\WINDOWS'
VS80COMNTOOLS = 'C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\'
DB2TEMPDIR = 'C:\Program Files\IBM\SQLLIB'
DERBY_HOME = 'C:\user\globe\derby'
GS_LIB = 'c:\Program Files\PDFCreator\GS8.54\gs8.54\lib'
USERDOMAIN = 'INETPSA'
OS = 'Windows_NT'
ALLUSERSPROFILE = 'C:\Documents and Settings\All Users'
OS2LIBPATH = 'C:\SYS\WINDOWS\system32\os2\dll;'
ARISHOME70 = 'C:\Program Files\ARIS7.0'
TEMP = '/cygdrive/c/DOCUME~1/j630464/LOCALS~1/Temp'
COMMONPROGRAMFILES = 'C:\Program Files\Common Files'
QTJAVA = 'C:\Program Files\Java\jre1.5.0_11\lib\ext\QTJava.zip'
USERNAME = 'J630464'
GS_PROG = 'c:\Program Files\PDFCreator\GS8.54\gs8.54\bin\gswin32.exe'
MAVEN_OPTS = '-Dfile.encoding=cp1252 -Xmx128m'
PROCESSOR_LEVEL = '6'
SYSTEMDRIVE = 'C:'
M2_JAVA_HOME = 'C:\JIP\bin\jdk1.5.0_12_off'
JAVA_HOME = 'C:\j2sdk1.4.2_10'
GS_DLL = 'c:\Program Files\PDFCreator\GS8.54\gs8.54\bin\gsdll32.dll'
USERPROFILE = 'C:\Documents and Settings\j630464'
LOGONSERVER = '\\BEE604'
PROCESSOR_ARCHITECTURE = 'x86'
!C: = 'C:\cygwin\bin'
SHLVL = '1'
M2_HOME = 'C:\JIP\bin\maven'
USERDNSDOMAIN = 'inetpsa.com'
PATHEXT = '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
HOMEDRIVE = 'C:'
PROMPT = '$P$G'
COMSPEC = 'C:\SYS\WINDOWS\system32\cmd.exe'
TMP = '/cygdrive/c/DOCUME~1/j630464/LOCALS~1/Temp'
SYSTEMROOT = 'C:\SYS\WINDOWS'
PROCESSOR_REVISION = '0f0b'
CLASSPATH = '.;C:\Program Files\IBM\SQLLIB\java\db2java.zip;C:\Program
Files\IBM\SQLLIB\java\db2jcc.jar;C:\Program
Files\IBM\SQLLIB\java\db2jcc_license_cisuz.jar;C:\Program
Files\IBM\SQLLIB\java\db2jcc_license_cu.jar;C:\Program
Files\IBM\SQLLIB\BIN'
PROGRAMFILES = 'C:\Program Files'
NOLGS = 'NOLGS'
NUMBER_OF_PROCESSORS = '1'
INCLUDE = 'C:\Program Files\IBM\SQLLIB\lib'
COMPUTERNAME = 'B680844'
PCOMM_ROOT = 'C:\Sys\Pcom\'
OLDPWD = '/cygdrive/c/cygwin/etc/postinstall'
_ = './cygcheck'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
  (default) = '/cygdrive'
  cygdrive flags = 0x0022
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
  (default) = '/cygdrive'
  cygdrive flags = 0x0022
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/
  (default) = 'C:\cygwin'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
  (default) = 'C:\cygwin/bin'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
  (default) = 'C:\cygwin/lib'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options

c:  hd  NTFS 76319Mb  89% CP CS UN PA FC PSAV3
d:  cd N/AN/A

.  /cygdrive  userbinmode,cygdrive
C:\cygwin  /  system  binmode
C:\cygwin/bin  /usr/bin   system  binmode
C:\cygwin/lib  /usr/lib   system  binmode
.  /cygdrive  

Re: Installation problem - "unix" root doesn't work

2009-02-19 Thread Dave Korn
Michel Wozniak wrote:

> The result is the same.
> In the setup.log, all the postinstalls give :
>2009/02/19 13:03:06 running: C:\cygwin\bin\bash.exe -c
> /etc/postinstall/passwd-grp.sh
>2009/02/19 13:03:06 abnormal exit: exit code=127
> 
> If you launch it manually, you get :
>   C:\cygfiles>C:\cygwin\bin\bash.exe -c /etc/postinstall/update-info-dir.sh
>   /cygdrive/c/cygwin/bin/bash: /etc/postinstall/update-info-dir.sh: No
> such file or directory

  So, what is in /etc/postinstall?  Is there an "update-info-dir.sh.done"?
What happens earlier in the setup.log, at the point where it should be
untarring the "_update-info-dir" package?  Did it fail to create the script
there?  Or has it somehow ended up in the wrong directory somewhere?

cheers,
  DaveK



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Installation problem - "unix" root doesn't work

2009-02-19 Thread Dave Korn

 Oh, and another thing occurred to me:

Michel Wozniak wrote:

> So, I cleaned all the entries you asked from the user and system PATH
> env, and I relaunched an installation.
> 
> The result is the same.

  Another question we should try and answer:

> If you launch it manually, you get :
>   C:\cygfiles>C:\cygwin\bin\bash.exe -c /etc/postinstall/update-info-dir.sh
>   /cygdrive/c/cygwin/bin/bash: /etc/postinstall/update-info-dir.sh: No
> such file or directory

  How come bash.exe is clearly existing in the bin dir here 

> The cygcheck -s -r -v gives :
> 
> Cygwin Configuration Diagnostics
> Current System Time: Thu Feb 19 13:12:56 2009

> C:\cygwin/bin  /usr/bin   system  binmode

> Not Found: bash
  ^

 but not here ...

> bash 3.2.48-21

 but it thinks the package is there ?  That's strange; what's actually in
the bin dir?  Were there any errors in setup.log when it unpacked bash?

  Maybe if you run through setup twice, the first time round get it to do
absolutely nothing except reinstall bash, then try again once bash is working
with a reinstall-on-top as described in the last post.

cheers,
  DaveK

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: Installation problem - "unix" root doesn't work

2009-02-19 Thread Buchbinder, Barry (NIH/NIAID) [E]
Michel Wozniak wrote on Thursday, February 19, 2009 5:36 AM:
> CygCheck -s -v -r gives me :

 "Run cygcheck -s -v -r > cygcheck.out and 
include that file as an attachment in your report. Please do not compress or 
otherwise encode the output. Just attach it as a straight text file so that it 
can be easily viewed."

My guess that the reason to include it as an attachment and not in the message 
itself is that the latter clutters the email archives, thereby making the 
search function less specific.  Someone with a problem concerning libpopt0 does 
not want to pull up every message with cygcheck -s -v -r output.

Best wishes,

- Barry
  Disclaimer: Statements made herein are not made on behalf of NIAID.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: SSH/SCREEN/REATTACH bug

2009-02-19 Thread Andrew Schulman
> Andrew, can you give us a bit more detail than just this micro snippet
> of information?
> 
> What about providing details about the failing test done in screen's
> configure...
> 
> What about extracting the code from configure and test it standalone...
> 
> What about maybe using strace and/or GDB on it to find out a bit more...
> 
> What about providing the standalone test to us eventually with
> instructions how to reproduce the problem and maybe some of the
> information you got by using strace/GDB...
> 
> ...instead of just leaving everything except of the bare information "it
> doesn't work" to the Cygwin developers?  As much as we like to get rid
> of bugs in Cygwin, we have a life beyond Cygwin, too.

Corinna, I sent exactly this report yesterday afternoon, but it seems not to
have gone through.  Will repost ASAP.


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



[1.7] "broken" pipe implementation?

2009-02-19 Thread Andrew Schulman
I'm compiling screen for 1.7.  The configure script has a test for a "usable"
pipe implementation, which passes, and another one for a "working" pipe
implementation, which fails.  The test for a working pipe implementation is zero
exit code from the following program (simplified for clarity):

---
#include 
#include 
#include 
#include 

#ifndef O_NONBLOCK
#define O_NONBLOCK O_NDELAY
#endif
#ifndef S_IFIFO
#define S_IFIFO 001
#endif

char *fin = "/tmp/conftest";

main()
{
  struct timeval tv;
  fd_set f;

#ifdef POSIX
  if (mkfifo(fin, 0600))
#else
  if (mknod(fin, S_IFIFO|0600, 0))
#endif
exit(1);
  close(0);
  if (open(fin, O_RDONLY|O_NONBLOCK))
exit(2);

  FD_SET(0, &f);
  tv.tv_sec = 1;
  tv.tv_usec = 0;
  if (select(1, &f, 0, 0, &tv))
exit(3);
  exit(0);
}
---

When I compile and run this program, the exit code is 3, so the select() test at
the end returns non-zero.  An extra printf shows that the return value of
select() is 1.

I'm a little out of my depth here, but let me see if I understand this test
correctly:

(1) Create a FIFO (fin) and open it non-blocking, read only as fd 0.
(2) Call select() to see if the kernel thinks that fd 0 can be read from.
(3) Fail when select() returns 1, which would mean that there's data to be read.

So in other words, with nothing writing to the fifo, select() should return 0,
but instead it returns 1, indicating that there's data available to be read.  I
guess this does sound broken.  I get the same result with -DPOSIX, BTW.

Is this a known bug?  Any prospect of fixing it?  This test also failed in
Cygwin 1.5, so ever since then screen has used sockets instead of fifos.  That's
mostly worked fine, but there are some bugs that come up from time to time, and
I'd like to be able to try the fifo implementation to see if it fixes them.

BTW, if I short-circuit the test and force configure to use the fifos anyway
(instead of sockets), then when I start screen, it hangs.  strace shows the
following output repeating ad infinitum (orpie is one of the processes that I
start in my .screenrc):

   86 43297100 [unknown (0x11B4)] orpie 5808 cygwin_select: sel.always_ready 0
50267 43347367 [unknown (0x11B4)] orpie 5808 select_stuff::cleanup: calling
cleanup routines
  144 43347511 [unknown (0x11B4)] orpie 5808 select_stuff::cleanup: calling
cleanup routines
   90 43347601 [unknown (0x11B4)] orpie 5808 select_stuff::~select_stuff:
deleting select records
   87 43347688 [unknown (0x11B4)] orpie 5808 cygwin_select: 0, 0x0, 0x0, 0x0,
0x18ECCD70
   87 43347775 [unknown (0x11B4)] orpie 5808 cygwin_select: to->tv_sec 0,
to->tv_usec 5, ms 50
   82 43347857 [unknown (0x11B4)] orpie 5808 cygwin_select: sel.always_ready 0
50140 43397997 [unknown (0x11B4)] orpie 5808 select_stuff::cleanup: calling
cleanup routines
  196 43398193 [unknown (0x11B4)] orpie 5808 select_stuff::cleanup: calling
cleanup routines
   68 43398261 [unknown (0x11B4)] orpie 5808 select_stuff::~select_stuff:
deleting select records
   64 43398325 [unknown (0x11B4)] orpie 5808 cygwin_select: 0, 0x0, 0x0, 0x0,
0x18ECCD70
   60 43398385 [unknown (0x11B4)] orpie 5808 cygwin_select: to->tv_sec 0,
to->tv_usec 5, ms 50
   99 43398484 [unknown (0x11B4)] orpie 5808 cygwin_select: sel.always_ready 0

So it does seem that the fifo implementation is broken in some way.

Thanks,
Andrew.

--
To reply by email, change "deadspam.com" to "alumni.utexas.net"


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Installation problem - "unix" root doesn't work

2009-02-19 Thread Michel Wozniak
Hi Dave,

Your last mail gave a hint to me. The fact that bash.exe exists in one
place and doesn't exist in another place made me think about
cygwin1.dll
Actually, I looked for it on my disk and I found a tool which included
in it an old version of cygwin1.dll.
Apparently, the installation of this tool was somewhat buggy because
the DLL was registered (loaded) but declared in the registry under an
another name... Something strange.
So, I got to erase it, restart the install and all went well.

That's tricky because you could register cygwin1.dll manually, it
worked well. But when anybody wanted to use the registered DLL, it
used not the new one, but rather the old one.

I suppose it's due to a crash or so.

Thank you very much for your help and for your sharp eye.

Michel Wozniak


2009/2/19 Dave Korn :
>
>  Oh, and another thing occurred to me:
>
> Michel Wozniak wrote:
>
>> So, I cleaned all the entries you asked from the user and system PATH
>> env, and I relaunched an installation.
>>
>> The result is the same.
>
>  Another question we should try and answer:
>
>> If you launch it manually, you get :
>>   C:\cygfiles>C:\cygwin\bin\bash.exe -c /etc/postinstall/update-info-dir.sh
>>   /cygdrive/c/cygwin/bin/bash: /etc/postinstall/update-info-dir.sh: No
>> such file or directory
>
>  How come bash.exe is clearly existing in the bin dir here 
>
>> The cygcheck -s -r -v gives :
>>
>> Cygwin Configuration Diagnostics
>> Current System Time: Thu Feb 19 13:12:56 2009
>
>> C:\cygwin/bin  /usr/bin   system  binmode
>
>> Not Found: bash
>  ^
>
>  but not here ...
>
>> bash 3.2.48-21
>
>  but it thinks the package is there ?  That's strange; what's actually in
> the bin dir?  Were there any errors in setup.log when it unpacked bash?
>
>  Maybe if you run through setup twice, the first time round get it to do
> absolutely nothing except reinstall bash, then try again once bash is working
> with a reinstall-on-top as described in the last post.
>
>cheers,
>  DaveK
>
> --
> Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:   http://cygwin.com/problems.html
> Documentation: http://cygwin.com/docs.html
> FAQ:   http://cygwin.com/faq/
>
>

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: [1.7] "broken" pipe implementation?

2009-02-19 Thread Christopher Faylor
On Thu, Feb 19, 2009 at 09:16:50AM -0500, Andrew Schulman wrote:
>I'm compiling screen for 1.7.  The configure script has a test for a "usable"
>pipe implementation, which passes, and another one for a "working" pipe
>implementation, which fails.  The test for a working pipe implementation is 
>zero
>exit code from the following program (simplified for clarity):

I'll look into this sometime today.

cgf

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Lftp hang while executing batch file

2009-02-19 Thread cygwin . 20 . maillinglist
Hi folks,

I found that the Version 3.7.6-3 have the problem executing batchfiles.
After upgrading from 3.7.6-1 my script does not longer work.
I started lftp -f batchfile where in the batchfile the connection to the
server 
And some action is done. It looks like that lftp hang while it tries to
connect.

I downgraded to 3.7.6-1 an everything works fine.

May be someone can reproduce and fix the problem.

Thanks 
   franz




--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: SSH/SCREEN/REATTACH bug

2009-02-19 Thread Corinna Vinschen
On Feb 19 09:15, Andrew Schulman wrote:
> > Andrew, can you give us a bit more detail than just this micro snippet
> > of information?
> > 
> > What about providing details about the failing test done in screen's
> > configure...
> > 
> > What about extracting the code from configure and test it standalone...
> > 
> > What about maybe using strace and/or GDB on it to find out a bit more...
> > 
> > What about providing the standalone test to us eventually with
> > instructions how to reproduce the problem and maybe some of the
> > information you got by using strace/GDB...
> > 
> > ...instead of just leaving everything except of the bare information "it
> > doesn't work" to the Cygwin developers?  As much as we like to get rid
> > of bugs in Cygwin, we have a life beyond Cygwin, too.
> 
> Corinna, I sent exactly this report yesterday afternoon, but it seems not to
> have gone through.  Will repost ASAP.

Thank you.  I didn't want to offend you, I was just disappointed to see
nothing but "doesn't work".  Sorry.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Can't compile Screen: Undefined reference to __imp__ospeed

2009-02-19 Thread Presto Ten


Andrew Schulman-3 wrote:
> 
>> screen-256color: GNU Screen compiled with the --enable-colors256 flag;
>> without
>> this flag, terminals launched from within Screen can only show 16 colors. 
>> Depending on your terminal, you may need to launch Screen as
>> 'TERM=screen-256color screen' in order for 256 colors to work.
> 
> OK, thanks.  I'll put a new release out soon with 256 colors enabled, at
> least
> for Cygwin 1.5.
> 
> I'm curious:  where do you use this?  I've been using 8 or 16 colors I
> guess,
> for all of this time and never noticed it.  I don't colorize my ls output,
> for
> example, as I know many people do.  If there's a common application for
> this, it
> would help to point it out to users.
> 

Great that this will be included in an official Cygwin screen package! The
256 colors mode is invaluable for people using Emacs in terminal mode: Emacs
supports 256 colors, and code becomes a lot easier on the eye.

By the way, I downloaded
http://home.comcast.net/~andrex2/cygwin-1.5/screen/screen-4.0.3-3.tar.bz2
and tried it on Cygwin 1.5 with PuTTY (256 colors enabled): started screen
plus Emacs, and it shows all 256 colors with M-x list-colors-display!
Beautiful.

Note that for Emacs to recognize screen-256color, you need to add the
following into "term/screen-256color.el" in the load path (for Emacs 22):

(defun terminal-init-screen ()
  "Terminal initialization function for screen."
  ;; Use the xterm color initialization code.
  (load "term/xterm")
  (xterm-register-default-colors)
  (tty-set-up-initial-frame-faces))

-p
-- 
View this message in context: 
http://www.nabble.com/Can%27t-compile-Screen%3A-Undefined-reference-to-__imp__ospeed-tp21660755p22103799.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Can't compile Screen: Undefined reference to __imp__ospeed

2009-02-19 Thread Andrew Schulman
> Note that for Emacs to recognize screen-256color, you need to add the
> following into "term/screen-256color.el" in the load path (for Emacs 22):
> 
> (defun terminal-init-screen ()
>   "Terminal initialization function for screen."
>   ;; Use the xterm color initialization code.
>   (load "term/xterm")
>   (xterm-register-default-colors)
>   (tty-set-up-initial-frame-faces))

Thanks, this is good to know.  I'll include it in the screen.README.


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Can't compile Screen: Undefined reference to __imp__ospeed

2009-02-19 Thread Matt Wozniski
On 2/19/09, Andrew Schulman wrote:
> > Note that for Emacs to recognize screen-256color, you need to add the
>  > following into "term/screen-256color.el" in the load path (for Emacs 22):
>  >
>  > (defun terminal-init-screen ()
>  >   "Terminal initialization function for screen."
>  >   ;; Use the xterm color initialization code.
>  >   (load "term/xterm")
>  >   (xterm-register-default-colors)
>  >   (tty-set-up-initial-frame-faces))
>
>
> Thanks, this is good to know.  I'll include it in the screen.README.

Having xterm set TERM=xterm-256color and screen set
TERM=screen-256color makes vim's high color support work fine with no
extra configuration required.

~Matt

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Cannot convert string "-*-lucida-medium-r-*-*-*-*-*-*-*-*-iso8859-1"

2009-02-19 Thread Jeff Y
I can not launch Oracle Installer from AIX by warning:
 
Warning: Cannot convert string "-*-lucida-medium-r-*-*-*-*-*-*-*-*-iso8859-1" 
to type FontStruct
Exception in thread "main"
 
Is there a fix for this?
 
I check Cygwin FAQ. How can I know if packages font-bh-dpi75 and 
font-bh-lucidatypewriter-dpi75 have been installed on my PC? 
 
Thanks a lot.
 
Jeff

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



fstream - problem with reading/writing to file

2009-02-19 Thread Pavel Kudrna

Hi,
I have found problem with read and write to file using fstream. The 
following example opens existing file for read+write, separately writes 
"Hello" and " world!" and in between it tries to read one character from 
the file. The problem is that without call to seekg() or tellg() the 
read fails and without seekp() or tellp() the second write of " world!" 
to the file fails too.

The same program works on linux with gcc 3.2.2.
Pavel Kudrna

$ cat rw.cpp
#include 
#include 

using namespace std;

int main()
{
fstream f( "file" );

f << "Hello";

// f.seekg( 0, fstream::cur );
// cout << "Get position: " << f.tellg() << endl;

char c;

f >> c;

cout << "Read character: " << c << endl;

// f.seekp( 0, fstream::cur );
// cout << "Put position: " << f.tellp() << endl;

f << " world!";

return 0;
}

$ g++ -g -o rw rw.cpp

$ echo 0123456789 >file; ./rw; cat file
Read character:
Hello56789

$ gcc -dumpversion
3.4.4

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Cannot convert string "-*-lucida-medium-r-*-*-*-*-*-*-*-*-iso8859-1"

2009-02-19 Thread Yaakov (Cygwin/X)
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Jeff Y wrote:
> I can not launch Oracle Installer from AIX by warning:
>  
> Warning: Cannot convert string "-*-lucida-medium-r-*-*-*-*-*-*-*-*-iso8859-1" 
> to type FontStruct
> Exception in thread "main"
>  
> Is there a fix for this?
>  
> I check Cygwin FAQ. How can I know if packages font-bh-dpi75 and 
> font-bh-lucidatypewriter-dpi75 have been installed on my PC? 

1) http://cygwin.com/acronyms/#PCYMTWLL

2) http://x.cygwin.com/docs/faq/cygwin-x-faq.html#q-where-are-my-fonts

3) Cygwin/X questions belong on the cygwin-xfree list.  Setting
Reply-To: accordingly.


Yaakov
Cygwin/X
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEAREIAAYFAkmdsrgACgkQpiWmPGlmQSOXzQCfUIB1AV8nbi7/LcYSqa03/oLz
QpYAnRMHYURc/jhRD+n/leKWj5MggQly
=hbcY
-END PGP SIGNATURE-

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: fstream - problem with reading/writing to file

2009-02-19 Thread Tim McDaniel

On Thu, 19 Feb 2009, Pavel Kudrna  wrote:

I have found problem with read and write to file using fstream. The
following example opens existing file for read+write, separately
writes "Hello" and " world!" and in between it tries to read one
character from the file. The problem is that without call to seekg()
or tellg() the read fails and without seekp() or tellp() the second
write of " world!" to the file fails too.  The same program works on
linux with gcc 3.2.2.


I'm pretty sure that at least the C standard for stdio said that,
between a read and a write (and the reverse), it was necessary to do a
seek on the file.  But I don't have a citation for that, and I don't
know much about C++ I/O to know what rules exist there.  I only
mention this in case it might prompt someone else who knows where to
look.

--
Tim McDaniel, t...@panix.com

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Cannot convert string "-*-lucida-medium-r-*-*-*-*-*-*-*-*-iso8859-1"

2009-02-19 Thread Jeff Y
Thanks for your reply.

I see two folders /usr/share/fonts/75dpi, /usr/share/fonts/100dpi on my PC. But 
I do not know if they are the two needed font packages or not, and how to use 
them to fix my issue.

Please give some details. Thanks.

--- On Thu, 2/19/09, Yaakov (Cygwin/X)  wrote:

> From: Yaakov (Cygwin/X) 
> Subject: Re: Cannot convert string 
> "-*-lucida-medium-r-*-*-*-*-*-*-*-*-iso8859-1"
> To: cygwin-xf...@cygwin.com
> Cc: cygwin@cygwin.com
> Date: Thursday, February 19, 2009, 12:27 PM
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
> 
> Jeff Y wrote:
> > I can not launch Oracle Installer from AIX by warning:
> >  
> > Warning: Cannot convert string
> "-*-lucida-medium-r-*-*-*-*-*-*-*-*-iso8859-1" to
> type FontStruct
> > Exception in thread "main"
> >  
> > Is there a fix for this?
> >  
> > I check Cygwin FAQ. How can I know if packages
> font-bh-dpi75 and font-bh-lucidatypewriter-dpi75 have been
> installed on my PC? 
> 
> 1) http://cygwin.com/acronyms/#PCYMTWLL
> 
> 2)
> http://x.cygwin.com/docs/faq/cygwin-x-faq.html#q-where-are-my-fonts
> 
> 3) Cygwin/X questions belong on the cygwin-xfree list. 
> Setting
> Reply-To: accordingly.
> 
> 
> Yaakov
> Cygwin/X
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (Cygwin)
> Comment: Using GnuPG with Mozilla -
> http://enigmail.mozdev.org
> 
> iEYEAREIAAYFAkmdsrgACgkQpiWmPGlmQSOXzQCfUIB1AV8nbi7/LcYSqa03/oLz
> QpYAnRMHYURc/jhRD+n/leKWj5MggQly
> =hbcY
> -END PGP SIGNATURE-
> 
> --
> Unsubscribe info: 
> http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:   http://cygwin.com/problems.html
> Documentation: http://cygwin.com/docs.html
> FAQ:   http://cygwin.com/faq/

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: Cannot convert string "-*-lucida-medium-r-*-*-*-*-*-*-*-*-iso8859-1"

2009-02-19 Thread Mike Ayers

FAQ 3.5:

"The lucida font family is provided by the package font-bh-dpi75 (or 
font-bh-dpi100). The monospaced version, lucida typewriter is provided by the 
package font-bh-lucidatypewriter-dpi75 (or font-bh-lucidatypewriter-dpi100). "


HTH,

Mike

> -Original Message-
> From: cygwin-xfree-ow...@cygwin.com 
> [mailto:cygwin-xfree-ow...@cygwin.com] On Behalf Of Jeff Y
> Sent: Thursday, February 19, 2009 12:35 PM
> To: cygwin-xf...@cygwin.com
> Cc: cygwin@cygwin.com
> Subject: Re: Cannot convert string 
> "-*-lucida-medium-r-*-*-*-*-*-*-*-*-iso8859-1"
> 
> Thanks for your reply.
> 
> I see two folders /usr/share/fonts/75dpi, 
> /usr/share/fonts/100dpi on my PC. But I do not know if they 
> are the two needed font packages or not, and how to use them 
> to fix my issue.
> 
> Please give some details. Thanks.
> 
> --- On Thu, 2/19/09, Yaakov (Cygwin/X) 
>  wrote:
> 
> > From: Yaakov (Cygwin/X) 
> > Subject: Re: Cannot convert string 
> "-*-lucida-medium-r-*-*-*-*-*-*-*-*-iso8859-1"
> > To: cygwin-xf...@cygwin.com
> > Cc: cygwin@cygwin.com
> > Date: Thursday, February 19, 2009, 12:27 PM
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA256
> > 
> > Jeff Y wrote:
> > > I can not launch Oracle Installer from AIX by warning:
> > >  
> > > Warning: Cannot convert string
> > "-*-lucida-medium-r-*-*-*-*-*-*-*-*-iso8859-1" to
> > type FontStruct
> > > Exception in thread "main"
> > >  
> > > Is there a fix for this?
> > >  
> > > I check Cygwin FAQ. How can I know if packages
> > font-bh-dpi75 and font-bh-lucidatypewriter-dpi75 have been
> > installed on my PC? 
> > 
> > 1) http://cygwin.com/acronyms/#PCYMTWLL
> > 
> > 2)
> > http://x.cygwin.com/docs/faq/cygwin-x-faq.html#q-where-are-my-fonts
> > 
> > 3) Cygwin/X questions belong on the cygwin-xfree list. 
> > Setting
> > Reply-To: accordingly.
> > 
> > 
> > Yaakov
> > Cygwin/X
> > -BEGIN PGP SIGNATURE-
> > Version: GnuPG v1.4.9 (Cygwin)
> > Comment: Using GnuPG with Mozilla -
> > http://enigmail.mozdev.org
> > 
> > iEYEAREIAAYFAkmdsrgACgkQpiWmPGlmQSOXzQCfUIB1AV8nbi7/LcYSqa03/oLz
> > QpYAnRMHYURc/jhRD+n/leKWj5MggQly
> > =hbcY
> > -END PGP SIGNATURE-
> > 
> > --
> > Unsubscribe info: 
> > http://cygwin.com/ml/#unsubscribe-simple
> > Problem reports:   http://cygwin.com/problems.html
> > Documentation: http://cygwin.com/docs.html
> > FAQ:   http://cygwin.com/faq/
> 
> --
> Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:   http://cygwin.com/problems.html
> Documentation: http://x.cygwin.com/docs/
> FAQ:   http://x.cygwin.com/docs/faq/
> 
> 

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: fstream - problem with reading/writing to file

2009-02-19 Thread Greg Chicares
On 2009-02-19 20:33Z, Tim McDaniel wrote:
> On Thu, 19 Feb 2009, Pavel Kudrna  wrote:
>> I have found problem with read and write to file using fstream. The
>> following example opens existing file for read+write, separately
>> writes "Hello" and " world!" and in between it tries to read one
>> character from the file. The problem is that without call to seekg()
>> or tellg() the read fails and without seekp() or tellp() the second
>> write of " world!" to the file fails too.  The same program works on
>> linux with gcc 3.2.2.
> 
> I'm pretty sure that at least the C standard for stdio said that,
> between a read and a write (and the reverse), it was necessary to do a
> seek on the file.  But I don't have a citation for that, and I don't

I think you mean C99 7.19.5.3/6, which says

"output shall not be directly followed by input without an intervening
call to the fflush function or to a file positioning function"

and vice versa.

> know much about C++ I/O to know what rules exist there.  I only
> mention this in case it might prompt someone else who knows where to
> look.

The C++ standard refers to the C standard for low-level stuff like this.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: [ANNOUNCEMENT] [1.7] Updated: file-5.00-1

2009-02-19 Thread Charles Wilson
Corinna Vinschen wrote:
> I've updated the Cygwin 1.7 version of file to 5.00-1.

Odd behavior: after I did a rebaseall, I was consistently seeing
coredumps using this version of file.  Reverting to the older version of
file fixed it, as did re-installing the new version.

I haven't rebased again, but is there any reason to suspect that
cygmagic-1.dll is not rebaseable?

(Vista Home Premium 32bit; cygwin-1.7.0-40)

--
Chuck


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/