2#include "internal/missing.h"
6#if defined HAVE_SYS_PARAM_H
9static void* stub_options(
int argc,
char **argv);
10#define ruby_options stub_options
15stub_options(
int argc,
char **argv)
18 char *xargv[4] = {NULL, xflag};
22#if defined __CYGWIN__ || defined _WIN32
25#elif defined __linux__
27 char selfexe[MAXPATHLEN];
28 ssize_t
len = readlink(
"/proc/self/exe", selfexe,
sizeof(selfexe));
30 perror(
"readlink(\"/proc/self/exe\")");
36#elif defined HAVE_DLADDR
39 if (!dladdr(stub_options, &dli)) {
43 cmd = (
char *)dli.dli_fname;
47#ifndef HAVE_SETPROCTITLE
49 ruby_init_setproctitle(argc, argv);
55 ret = ruby_options(3, xargv);
void ruby_set_argv(int argc, char **argv)
Sets argv that ruby understands.
int len
Length of the buffer.