On Fri, Oct 26, 2007 at 03:28:28PM -0500, Les Mikesell wrote:
> John Rouillard wrote:
> >
> >open("/usr/local/src/fastforward-0.51/warn-auto.sh",
> >  O_RDONLY|O_LARGEFILE) = 3
> >fstat64(3, {st_mode=S_IFREG|0644, st_size=64, ...}) = 0
> >read(3, "#!/bin/sh\n# WARNING: This file w"..., 64) = 64
> >close(3)                                = 0
> >select(2, NULL, [1], NULL, {60, 0})     = 1 (out [1], left  (line 2799)
> >  {60, 0})
> >write(1, "\300\0\0\7\0waitpid\0__errno_location\0er"...,
> >  196) = 196
> >select(2, NULL, [1], NULL, {60, 0})     = 1 (out [1], left
> >  {60, 0})
> >write(1, "\4\0\0\7\377\377\377\377", 8) = 8
> >select(1, [0], [], NULL, {60, 0})       = 0 (Timeout)
> >select(1, [0], [], NULL, {60, 0})       = 0 (Timeout)
> >select(1, [0], [], NULL, {60, 0})       = 0 (Timeout)
> >select(1, [0], [], NULL, {60, 0})       = 0 (Timeout)
> >select(1, [0], [], NULL, {60, 0})       = 0 (Timeout)
> >select(1, [0], [], NULL, {60, 0})       = 0 (Timeout)
> >select(1, [0], [], NULL, {60, 0})       = 0 (Timeout)
> >select(1, [0], [], NULL, {60, 0})       = 0 (Timeout)
> >
> >and toast city.
> >
> >What's wierd is the select 2 after the close. 
> 
> There are earlier selects on fd2 that aren't followed by a write.

Correct, but they occur before the input file closes.

> The real problem is the select on fd1 (stdout) that tells you that
> a write would block.
> 
> >I can make the whole file available on the web if you or anybody else
> >want's it. Contact me off list, no sense spamming people.
> 
> I don't think it would help.  The question is, why can't you write to 
> stdout?  It should be connected to sshd which should be passing stuff to 
> the invoking ssh and perl should be consuming it.

Do you mean this select?

> >select(2, NULL, [1], NULL, {60, 0})     = 1 (out [1], left  (line 2799)
> >  {60, 0})

My C is rusty, but I think that means:

  look at no fd's for reading and fd 1 for writing and no fd's for
  errors. Time out in 60.000 seconds.
  
  What I am not sure of is why the first argument is 2. I would expect
  that if the [1] was [1, 2] with two fd's. Since there is
  only one fd in the set (namely fd 1), I would expect the 2 to be 1.

  In nay case, the select call returns 1 meaning that there is one
  file descriptor ready for writing and it waited 0 seconds to
  determine the write handle was ready to be written to. Then the write
  occurs:

> >write(1, "\300\0\0\7\0waitpid\0__errno_location\0er"...,
> >  196) = 196

  writing 196 bytes.

> >select(2, NULL, [1], NULL, {60, 0})     = 1 (out [1], left
> >  {60, 0})

  again indicates that fd 1 is available for writing. an 8 byte write is
  done then fd 0 is checked to see if there is anything to read

> >write(1, "\4\0\0\7\377\377\377\377", 8) = 8
> >select(1, [0], [], NULL, {60, 0})       = 0 (Timeout)

  and there never is anything to read.

So by that point it is waiting for data/info from the server and there
is no data forthcoming. Can you point out where my analysis is wrong?

-- 
                                -- rouilj

John Rouillard
System Administrator
Renesys Corporation
603-643-9300 x 111

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

Reply via email to