Amanda-Users

Re: Backup issues with OpenBSD 4.5 machines

2009-09-04 13:44:14
Subject: Re: Backup issues with OpenBSD 4.5 machines
From: "Dustin J. Mitchell" <dustin AT zmanda DOT com>
To: Nathan Stratton Treadway <nathanst AT ontko DOT com>
Date: Fri, 4 Sep 2009 13:11:39 -0400
Attached is a test program I just put together which does about what
Jean-Louis specified above (with the addition of some closed fd's).
This works fine on my mac, which is the closest approximation to
OpenBSD I have access to at the moment.  How does it work on 4.5?

The file-descriptor gymnastics that amandad performs is pretty crazy,
so it's quite possible I've misread the code and it's doing something
stupid, but please let me know what this test program does.

Second, in Jean-Louis' minimal patch, can you change it to read

  g_debug("first, fcntl returns %d; O_NONBLOCK=%d", fcntl(datafd,
F_GETFL, 0), O_NONBLOCK);
  g_debug("and then fcntl returns %d; O_NONBLOCK=%d", fcntl(datafd,
F_GETFL, 0), O_NONBLOCK);

and let me know what the corresponding lines in the debug file say?
It will be interesting to know if the descriptor flags have O_NONBLOCK
set either time.

We'll get to the bottom of this :)

Dustin

-- 
Open Source Storage Engineer
http://www.zmanda.com

Attachment: test.c
Description: Binary data