38 int i, ac;
39 char **av, **p;
40 char isaname[16];
41
42 ac = argc + 3;
43 av = p = alloca(sizeof (char *) * ac);
44
45 *p++ = "/usr/java/bin/java";
46 *p++ = "-jar";
47 *p++ = "/opt/SUNWdtrt/lib/java/jdtrace.jar";
48
49 argc--;
50 argv++;
51
52 for (i = 0; i < argc; i++) {
53 p[i] = argv[i];
54 }
55 p[i] = NULL;
56
57 if (sysinfo(SI_ARCHITECTURE_64, isaname, sizeof (isaname)) != -1)
58 asprintf(av, "/usr/java/bin/%s/java", isaname);
59
60 (void) execv(av[0], av);
61 err(1, "exec failed");
62 }
|
38 int i, ac;
39 char **av, **p;
40 char isaname[16];
41
42 ac = argc + 3;
43 av = p = alloca(sizeof (char *) * ac);
44
45 *p++ = "/usr/java/bin/java";
46 *p++ = "-jar";
47 *p++ = "/opt/SUNWdtrt/lib/java/jdtrace.jar";
48
49 argc--;
50 argv++;
51
52 for (i = 0; i < argc; i++) {
53 p[i] = argv[i];
54 }
55 p[i] = NULL;
56
57 if (sysinfo(SI_ARCHITECTURE_64, isaname, sizeof (isaname)) != -1)
58 (void) asprintf(av, "/usr/java/bin/%s/java", isaname);
59
60 (void) execv(av[0], av);
61 err(1, "exec failed");
62 }
|