- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Perl IPC UNIX-Domain Sockets
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-26-2003 05:11 AM
тАО06-26-2003 05:11 AM
Perl IPC UNIX-Domain Sockets
I'm using Perl 5.6, HPUX 11.11, and the IO::Socket module that comes standard with Perl 5.6.
I'm attaching a short little test script that shows what I'm doing, but the real guts of it is:
$server = IO::Socket::UNIX->new(
LocalAddr => '/tmp/mysock',
Type => SOCK_DGRAM,
Listen => 5)
or die $!;
This executes with no errors, but the /tmp/mysock file doesn't get created, and then when I do the $client = $server->accept() it doesn't block waiting for input. It just falls through.
I've been through the O'Reilly Perl books for two days now, and I can't seem to spot my error. And I KNOW the people here aren't nearly as mean as on comp.lang.perl.misc, so here I am.
Anyone have any insight?
Thanks
Russ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-26-2003 05:31 AM
тАО06-26-2003 05:31 AM
Re: Perl IPC UNIX-Domain Sockets
Try data in
http://www.perlfect.com/articles/sockets.shtml
http://www.linuxchix.org/pipermail/techtalk/2001-August/008554.html
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-26-2003 05:42 AM
тАО06-26-2003 05:42 AM
Re: Perl IPC UNIX-Domain Sockets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2003 02:36 AM
тАО07-01-2003 02:36 AM
Re: Perl IPC UNIX-Domain Sockets
$server = IO::Socket::UNIX->new(
Local => '/tmp/mysock',
Type => SOCK_DGRAM,
Listen => 5)
or die $!;
That should work fine.
If you print $! after the failed accept() called you'd see an "invalid argument" error.
Cheers,
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2003 06:11 AM
тАО07-01-2003 06:11 AM
Re: Perl IPC UNIX-Domain Sockets
our $server = IO::Socket::UNIX->new(
Local => '/tmp/mysock',
Type => SOCK_STREAM,
Listen => 5,
proto => 0) or die '$@';
The real parm is 'Local=>' and according to the socket(2) manpage, datagram sockets aren't supported for Unix domain sockets, and from what I can tell, datagram sockets probably aren't reliable enough for my purposes anyway.
And with IO::Socket you have to check $@ instead of $!.
Whew.
Anyway, thanks for your help!
Russ