util  Diff

Differences From Artifact [c9d2d3baea]:

To Artifact [bebef73805]:


331
332
333
334
335
336
337
338
339
340

341
342
343
344
345
346
347

	size_t nsz;
	const char* basename = argv[0], *p;
	for (p = argv[0]; *p!=0; ++p) {
		if(*p == '/') basename = p + 1;
	}
	nsz = p - basename;
	char shid[nsz + sizeof shmem_prefix + 0];
	strncpy(shid,shmem_prefix,sizeof shmem_prefix);
	strncpy(shid + sizeof shmem_prefix - 1, basename, nsz);


	if (op == mode_go) {
		int fd;
		if ((fd = shm_open(shid, O_RDWR, 0600)) == -1) {
			const char* args[] = {
				"urxvtc", "-bg", "[90]#4b0024",
				          "-e",  argv[0],







|


>







331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348

	size_t nsz;
	const char* basename = argv[0], *p;
	for (p = argv[0]; *p!=0; ++p) {
		if(*p == '/') basename = p + 1;
	}
	nsz = p - basename;
	char shid[nsz + sizeof shmem_prefix];
	strncpy(shid,shmem_prefix,sizeof shmem_prefix);
	strncpy(shid + sizeof shmem_prefix - 1, basename, nsz);
	shid[nsz + sizeof shmem_prefix - 1] = 0;

	if (op == mode_go) {
		int fd;
		if ((fd = shm_open(shid, O_RDWR, 0600)) == -1) {
			const char* args[] = {
				"urxvtc", "-bg", "[90]#4b0024",
				          "-e",  argv[0],