Skip to content

Conversation

@elfpipe
Copy link
Collaborator

@elfpipe elfpipe commented Dec 20, 2024

  • Fix problem with lingering pipes (spawnvpe).
  • Fix problem with undertermined size of pthread_barrier_t (common.h/pthread.h).

…rmined size of pthread_barrier_t (common.h/pthread.h).
Copy link
Collaborator

@afxgroup afxgroup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't leave printfs in the code

@elfpipe
Copy link
Collaborator Author

elfpipe commented Dec 20, 2024

Code updated.

#define VSTRING "clib4.library 1.4.1 (17.12.2024)\r\n"
#define VERSTAG "\0$VER: clib4.library 1.4.1-5d728de (17.12.2024)"
#define VSTRING "clib4.library 1.4.1 (20.12.2024)\r\n"
#define VERSTAG "\0$VER: clib4.library 1.4.1-5d728de (20.12.2024)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes should not be in the repo. These are changed when we do a new release. If you be so kind to revert those changes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't make those changes. There is some automatic feature autogenerating these.

// DebugPrintF("[child :] Done.");
// FreeSignal(ed->childSignal);
// }
#define USE_CNPT 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are going to use this new definition, we probably need to document it at the README file. Can you please add some info about what this is, what does it enable and how to enable it if needed? It would be great if that was part of this PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this is overkill. I am primarily keeping the version of the text using CreateNewProcTags() for research reasons. At present only SystemTags will enable full functioning in cmake. CNPT gives the strange side effect, that the child will have its parents name in argv[0] (at least when the child uses newlib, as in the case of (g)make).

I could be convinced to ditch the CNPT code, or just replace it with #if 0.

snprintf(finalpath, finalpath_len, "%s %s", name, arg_string);
snprintf(processName, NAMELEN - 1, "Spawned Process #%d", __clib4->__children);
int full_command_len = strlen(name) + 1 + arg_string_len + 1; // '\0'
char *full_command = (char*)malloc(full_command_len);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that you renamed the finalpath to full_command but I do not see where this is freed. Maybe that was forgotten or we missed it in first place. Should we free that memory?

closefh[2] = TRUE;
}

D(("(*)Calling SystemTags.\n"));
Copy link
Contributor

@walkero-gr walkero-gr Dec 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this line needs to get after #if USE_CNPT ... #else otherwise it will be confusing for users who check the debug and have the USE_CNPT enabled

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, we might need one for CreateNewProcTags after line 297 and this one moved after line 336

// }
/* * * * *
Note for future generations : CreateNewProc is not suited for running shell commands.
The only way to have a full shell environment (appart from using internal packet structures),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apart*

@afxgroup afxgroup merged commit 40cf2e3 into AmigaLabs:development Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants