The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Newsgroups: comp.lang.ruby
From: nobu.nok...@softhome.net
Date: Fri, 5 Mar 2004 01:35:44 +0900
Local: Thurs, Mar 4 2004 11:35 am
Subject: Re: non-root binary distribution
Hi,
At Fri, 5 Mar 2004 00:51:39 +0900, > Based on your suggestion, I've created a C wrapper like below. The real I recommend static-linked binary after all. You'd have no merit > ruby is renamed to "ruby.real". Advice welcome, since this is probably > only the 7th or 8th C program I've written, ever. :-) of shared library at all if you put the copy in each users' space. > #include <stdio.h> You'd better to get rid of magic numbers. > #include <errno.h> > int main(int argc, char *argv[]) { > p = (char *)getenv("LD_LIBRARY_PATH"); Use strcpy instead of strcat here, content of malloc'ed area is > if ((env = (char *)malloc(512+1+(p==NULL ? 0:strlen(p)))) == NULL) { > fprintf(stderr, "malloc() failed: %s\n", strerror(errno)); > exit(1); > } > strcat(env, "LD_LIBRARY_PATH="); not guaranteed. -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||