Re: Popen and EVFILT_WRITE question

2008-03-31 Thread Harti Brandt
On Mon, 31 Mar 2008, Dag-Erling Smrgrav wrote:

DSMel [EMAIL PROTECTED] writes:
DS
DSEV_SET(changes[0], fileno(proc), EVFILT_WRITE, EV_ADD|EV_ENABLE, 0,
DS0, 0);
DSEV_SET(changes[1], fileno(proc), EVFILT_READ, EV_ADD|EV_ENABLE, 0,
DS0, 0);
DS
DSThis is never going to work.
DS
DSFirst, the second kevent overrides the first, because they both have the
DSsame ident.

Why is that so? The man page states that the kevent is identified by the
(ident, filter) pair. This would also make more sense, because with
bi-directional descriptors (sockets or so) you might want to 'select' on read
and write.

harti
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


MODULES_OVERRIDE magic needed

2008-03-31 Thread Danny Braniss
hi,
I'm trying to compile only a few kernel modules, but
using MODULES_OVERRIDE I can only select one module.
MODULE_OVERRIDE=unionfs
or
MODULE_OVERRIDE=if_sis
is ok, but
MODULE_OVERRIDE=if_sis unionfs
failes with either
if_sis: not found
if it's defined in src.conf, or with
make: don't know how to make if_sis
from the command line.

danny


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: MODULES_OVERRIDE magic needed

2008-03-31 Thread Stefan Lambrev

Greetings,

Danny Braniss wrote:

hi,
I'm trying to compile only a few kernel modules, but
using MODULES_OVERRIDE I can only select one module.
MODULE_OVERRIDE=unionfs
or
MODULE_OVERRIDE=if_sis
is ok, but
MODULE_OVERRIDE=if_sis unionfs
failes with either
if_sis: not found
if it's defined in src.conf, or with
make: don't know how to make if_sis
from the command line.
  

MODULES_OVERRIDE=module1 module2
works for me on -current

Try removing quotes.

danny


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]
  


--

Best Wishes,
Stefan Lambrev
ICQ# 24134177

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: MODULES_OVERRIDE magic needed

2008-03-31 Thread Rong-en Fan
On Mon, Mar 31, 2008 at 10:11 PM, Danny Braniss [EMAIL PROTECTED] wrote:
 hi,
  I'm trying to compile only a few kernel modules, but
  using MODULES_OVERRIDE I can only select one module.
 MODULE_OVERRIDE=unionfs
  or
 MODULE_OVERRIDE=if_sis
  is ok, but
 MODULE_OVERRIDE=if_sis unionfs
  failes with either
 if_sis: not found

Try

MODULE_OVERRIDE=if_sis unionfs

I think that is what I used before.

Regards,
Rong-En Fan
  if it's defined in src.conf, or with
 make: don't know how to make if_sis
  from the command line.

  danny


  ___
  freebsd-hackers@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
  To unsubscribe, send any mail to [EMAIL PROTECTED]

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Purpose of O_EXEC?

2008-03-31 Thread Ivan Voras
Hi,
What is the purpose of O_EXEC (open file for execution) flag to
open(2)? Just a hint to the VM system on how to cache the file pages or
is there something else that makes it different from O_RDONLY?

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Purpose of O_EXEC?

2008-03-31 Thread Kostik Belousov
On Mon, Mar 31, 2008 at 06:01:48PM +0200, Ivan Voras wrote:
 Hi,
 What is the purpose of O_EXEC (open file for execution) flag to
 open(2)? Just a hint to the VM system on how to cache the file pages or
 is there something else that makes it different from O_RDONLY?

No,
this is the only way to open file that has, for instance, mode 0111.
You can get the filedescriptor pointing to this file, that is useful
for the fexecve(2). Note that fexecve(2) ignores the open mode of the
filedescriptor and checks the vnode access right for the exec.


pgpekVy5N9fwp.pgp
Description: PGP signature


Re: MODULES_OVERRIDE magic needed

2008-03-31 Thread Steven Hartland

The following works fine here note its MODULE'S' not MODULE

makeoptions MODULES_OVERRIDE=linux linprocfs acpi nfsclient nfsserver nullfs 
accf_http

   Regards
   Steve

- Original Message - 
From: Danny Braniss [EMAIL PROTECTED]

To: freebsd-hackers@freebsd.org
Sent: Monday, March 31, 2008 3:11 PM
Subject: MODULES_OVERRIDE magic needed



hi,
I'm trying to compile only a few kernel modules, but
using MODULES_OVERRIDE I can only select one module.
MODULE_OVERRIDE=unionfs
or
MODULE_OVERRIDE=if_sis
is ok, but
MODULE_OVERRIDE=if_sis unionfs
failes with either
if_sis: not found
if it's defined in src.conf, or with
make: don't know how to make if_sis
from the command line.

danny


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]




This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. 


In the event of misdirection, illegible or incomplete transmission please 
telephone +44 845 868 1337
or return the E.mail to [EMAIL PROTECTED]

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Feature request

2008-03-31 Thread Patrick Dung
Hello

I have some suggestions about improving FreeBSD in some of the
areas/features. Let's discuss.

1. Cluster capability 

As I know, there is:
- Linux HA heartbeart in ports
- LVS (Linux Virtual Server for load balancing) for FreeBSD 5.3 in
http://dragon.linux-vs.org/~dragonfly/htm/lvs_freebsd.htm
- SunGrid in ports.

But looks like there is no native FreeBSD clustering/load balancing
tools to do it in 'a FreeBSD way'.

2. Networking support

As we know FreeBSD has a good history/reputation on networking.
FreeBSD lacks these support:

a) MPLS
For MPLS, Linux has project working since around in 2001.
It is called mpls-linux in Sourceforge.
There was a project to port Ayame to NetBSD 4.0 current, but I don't
know about the outcome.

b) NAT-T on IPSEC
I see NAT-T patch for FreeBSD 6 in 2005 but the patch not in
RELEASE/CURRENT.

As I know, there maybe patent infringement for NAT-T.
But I see NetBSD 3.0 (with warning) and Linux has NAT-T support out of
the box.
http://netbsd.gw.com/cgi-bin/man-cgi?ipsec++NetBSD-3.0

c) multiple default gateways
Looks like FreeBSD do not support metrics in 'route'.

3. Support LDAP SSO out of the box

Linux/Solaris/AIX have native LDAP SSO support.

I have asked about this feature before.
The problem is whether it should integrate OpenLDAP to base system.
BTW, I see ISC Bind, Sendmail and Amd automounter is in base.

4. LVM and file systems

As of FreeBSD 7.0, ZFS is ported.
This is great as FreeBSD do not have LVM in the past.
I am sure there is still room for improvement.
For example: ZFS/UFS shrink support, native file system journaling.

Regards
Patrick


  

No Cost - Get a month of Blockbuster Total Access now. Sweet deal for Yahoo! 
users and friends. 
http://tc.deals.yahoo.com/tc/blockbuster/text1.com
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Feature request

2008-03-31 Thread Mohacsi Janos




On Mon, 31 Mar 2008, Patrick Dung wrote:


Hello

I have some suggestions about improving FreeBSD in some of the
areas/features. Let's discuss.

1. Cluster capability

As I know, there is:
- Linux HA heartbeart in ports
- LVS (Linux Virtual Server for load balancing) for FreeBSD 5.3 in
http://dragon.linux-vs.org/~dragonfly/htm/lvs_freebsd.htm
- SunGrid in ports.

But looks like there is no native FreeBSD clustering/load balancing
tools to do it in 'a FreeBSD way'.


There is *BSD way of doing loadbalancing with pf. A big plus is the pf 
supports IPv6, while LVS does not.






2. Networking support

As we know FreeBSD has a good history/reputation on networking.
FreeBSD lacks these support:

a) MPLS
For MPLS, Linux has project working since around in 2001.
It is called mpls-linux in Sourceforge.
There was a project to port Ayame to NetBSD 4.0 current, but I don't
know about the outcome.

b) NAT-T on IPSEC
I see NAT-T patch for FreeBSD 6 in 2005 but the patch not in
RELEASE/CURRENT.

As I know, there maybe patent infringement for NAT-T.
But I see NetBSD 3.0 (with warning) and Linux has NAT-T support out of
the box.
http://netbsd.gw.com/cgi-bin/man-cgi?ipsec++NetBSD-3.0

c) multiple default gateways
Looks like FreeBSD do not support metrics in 'route'.



This is sometime missing. OpenBSD has good support for it - maybe can be 
ported from OpenBSD.





3. Support LDAP SSO out of the box

Linux/Solaris/AIX have native LDAP SSO support.

I have asked about this feature before.
The problem is whether it should integrate OpenLDAP to base system.
BTW, I see ISC Bind, Sendmail and Amd automounter is in base.



unfortunately you have to use the ports for this



4. LVM and file systems

As of FreeBSD 7.0, ZFS is ported.
This is great as FreeBSD do not have LVM in the past.
I am sure there is still room for improvement.
For example: ZFS/UFS shrink support, native file system journaling.

Regards
Patrick


Janos Mohacsi
Network Engineer, Research Associate, Head of Network Planning and Projects
NIIF/HUNGARNET, HUNGARY
Key 70EF9882: DEC2 C685 1ED4 C95A 145F  4300 6F64 7B00 70EF 9882






 

No Cost - Get a month of Blockbuster Total Access now. Sweet deal for Yahoo! 
users and friends.
http://tc.deals.yahoo.com/tc/blockbuster/text1.com
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Popen and EVFILT_WRITE question

2008-03-31 Thread Mel
On Monday 31 March 2008 05:49:33 Dag-Erling Smørgrav wrote:
 Mel [EMAIL PROTECTED] writes:
  Hi,
 
  from reading the manpage on EVFILT_WRITE I thought it would be an easy to
  use interface to detect when a program wants input.
  So far, that doesn't seem to be the case. Ultimately what I want to do is
  pipe all the popen(3)'d output to a logfile and act on any input it
  wants.
 
  Could anyone explain to me why I'm never getting the EVFILT_WRITE event
  in below testcode?
  (It doesn't matter if I open the pipe with w+ or r+).
 
  test.c:
  #include sys/types.h
  #include sys/event.h
  #include sys/time.h
  #include sysexits.h
  #include err.h
  #include stdio.h
 
  int main(int argc, char **argv)
  {
  FILE *proc;
  int kq;
  struct kevent changes[2], events[2];
 
  proc = popen(./test.sh, w+);
  if( -1 == (kq = kqueue()) )
  err(EX_OSERR, Cannot get a kqueue);
 
  EV_SET(changes[0], fileno(proc), EVFILT_WRITE, EV_ADD|EV_ENABLE, 0,
  0, 0);
  EV_SET(changes[1], fileno(proc), EVFILT_READ, EV_ADD|EV_ENABLE, 0,
  0, 0);

 This is never going to work.

 First, the second kevent overrides the first, because they both have the
 same ident.

No, the ident is one part of the uniqueness. The filter type is the second.

 Third, an EVFILT_WRITE event will trigger as long as there is space in
 the pipe buffer.

 There is no such thing as when a program wants input 
 in Unix;

Yeah, I figured that out. Still, the write never fires and that seems like a 
bug to me, cause it should fire since there's space in the buffer. In fact, 
if you fill the buffer partially before going into the event loop, it does 
fire each loop.
Plan was to use trickery like fill the buffer up to PIPE_SIZE and when it's 
drained means the child read the input and we should fill it again.
Then I saw the various pipe sizes and didn't think it would be a good idea, so 
went with a timeout of 'no input received' instead.

 it will either read input or it won't, and what happens when it 
 reads depends entirely on what the fd it reads from is connected to,
 whether it's a slow or fast device, blocking or non-blocking, etc.

The kernel knows that the fd at the end of the pipe is blocked for reading. 
Does it also know it's the end of a pipe and what's on the other end? Cause 
it would be a cool filter to have, if you could detect a blocked child as a 
parent. It sure is better then arbitrary timeouts (this code will run 'make 
install' as a daemon(3) and write 'yes' on those nasty post-install questions 
in ports).

-- 
Mel
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Feature request

2008-03-31 Thread Mike Meyer
On Mon, 31 Mar 2008 11:18:56 -0700 (PDT)
Patrick Dung [EMAIL PROTECTED] wrote:

 3. Support LDAP SSO out of the box
 
 Linux/Solaris/AIX have native LDAP SSO support.
 I have asked about this feature before.

 The problem is whether it should integrate OpenLDAP to base system.

Why OpenLDAP? Why not one of the other ldap implementations available
in the ports? In particular, do any of them already have plugins for
use with pam?

 BTW, I see ISC Bind, Sendmail and Amd automounter is in base.

Yes, but you're asking to move a major chunk of functionality into the
base from ports. That doesn't really happen very often, for lots of
good reasons. Those reasons are often used to suggest that the
packages you just named be moved *out* of the base system, but that's
not much easier than moving things into it.

The other issue is - well, how much use is this for ports? After all,
most of the servers you're going to install come from ports, so if
they don't play here, then there's not much of a win.

 4. LVM and file systems
 As of FreeBSD 7.0, ZFS is ported.
 This is great as FreeBSD do not have LVM in the past.

True, there's no volume manager per se. On the other hand, most of
the functionality provided by a volume manager is available through
the geom system. Frankly, geom is a lot saner than the volume managers
I've dealt with.

 I am sure there is still room for improvement.
 For example: ZFS/UFS shrink support, native file system journaling.

Um, is something wrong with gjournal? Or for that matter, soft updates
(which solve the same problem that journaling does, only with lower
overhead)? 

FreeBSD is an open source, volunteer driven project. A list of nice
to haves is cool for your personal use, but if you want to actually
make any of them happen, then you're the best person to do
that. Either start coding yourself, or convince somebody else to do it
(and you'll find cash offers work fairly well). Even then, it may not
make it into the base system. Being available as a port is often
considered sufficient, or it may be that your changes aren't
considered appropriate for some other reason, like duplicating
functionality that already exists.

  mike
-- 
Mike Meyer [EMAIL PROTECTED]  http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]