|
Glad to hear that you are up and running now. Satish Gungabeesoon iSeries AD Tools, IBM Canada Lab, 416-448-3269 (tl:778-3269) satish@ca.ibm.com "Buckingham, Ed" <Buckingham@AE.com> on 01/24/2001 04:14:30 PM Please respond to "Buckingham, Ed" <Buckingham@AE.com> To: Satish Gungabeesoon/Toronto/IBM%IBMCA <"Satish Gungabeesoon/Toronto/IBM%IBMCA"@localhost> cc: Vadim Berestetsky/Toronto/IBM%IBMCA <"Vadim Berestetsky/Toronto/IBM%IBMCA"@localhost>, Xuan Chen/Toronto/IBM%IBMCA <"Xuan Chen/Toronto/IBM%IBMCA"@localhost> Subject: RE: Source code for UNIXBIND I just wanted to say thanks! I finally got the Debug Server to start. It was an authority issue on the IFS "/" directory. After the upgrade to the new V4R4 version of the OS400 the authority was set to *RX. You can see the authority by keying the command WRKAUT /. This will show you all of the user profiles and there authority levels. Our *PUBLIC was set back to *RX. When we changed it to *RWX we were able to issue the STRDBGSVR command. When I checked the WRKLNK I saw the QDBGSVR_CONTROL SOCKET listed. I was able to bring up the debugger and everyone here is Happy, Happy, Happy. Thanks for all of your help! Sometimes the simplest things throw you for a loop. > -----Original Message----- > From: satish@ca.ibm.com [SMTP:satish@ca.ibm.com] > Sent: Wednesday, January 24, 2001 12:40 PM > To: Buckingham@AE.com > Subject: Source code for UNIXBIND > > > #include <stdio.h> > #include <string.h> /* String functions. */ > #include <stdlib.h> /* For free and others. */ > #include <stdarg.h> /* Variable args */ > #include <signal.h> /* For signal handlers. */ > #include <sys/types.h> /* For select call . */ > #include <sys/time.h> /* For select call . */ > #include <sys/socket.h> /* unix sockets */ > #include <sys/un.h> /* more unix sockets */ > #include <unistd.h> /* for select */ > #include <errno.h> > > void main(void) > { > int key; > int rc; > int temp; > int sd; > struct sockaddr_un sa; > > printf("Creating unix socket..\n"); > sd = socket(AF_UNIX, > SOCK_STREAM, > 0); > memset (&sa,0,sizeof(sa)); > sa.sun_family = AF_UNIX; > printf("Unlink unix path..\n"); > rc = unlink("/QDBGSVR_CONTROL"); > strcpy(sa.sun_path,"/QDBGSVR_CONTROL"); > temp = SUN_LEN(&sa); > printf("Attempting to bind to unix path QDBGSVR_CONTROL\n"); > if (bind(sd,(struct sockaddr *) &sa,SUN_LEN(&sa)) != 0){ > printf("Bind failed with error %i\n", errno); > rc = unlink("/QDBGSVR_CONTROL"); > close(sd); > } > printf("Bind was successful - do a WRKLNK and look for > QDBGSVR_CONTROL\n"); > printf("Press any key to close socket\n"); > getchar(); > rc = unlink("/QDBGSVR_CONTROL"); > close(sd); > printf("Socket closed\n"); > } > > Satish Gungabeesoon > iSeries AD Tools, IBM Canada Lab, > 416-448-3269 (tl:778-3269) > satish@ca.ibm.com +--- | This is the CODE/400 Mailing List! | To submit a new message, send your mail to CODE400-L@midrange.com. | To subscribe to this list send email to CODE400-L-SUB@midrange.com. | To unsubscribe from this list send email to CODE400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: larry@paque.net +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.