Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Race condition in csmake rule generation #47

Open
pelrun opened this issue Oct 3, 2019 · 3 comments
Open

Race condition in csmake rule generation #47

pelrun opened this issue Oct 3, 2019 · 3 comments

Comments

@pelrun
Copy link

pelrun commented Oct 3, 2019

When running csmake against my codebase, the output to the rules file from all the concurrent spy processes isn't synchronised, resulting in "BEGIN COMPILE...END COMPILE" blocks appearing in the middle of others, often breaking a random #define line in half.

Ideally each spy invocation should write to an independent temp file, and all the files concatenated at the end of the run.

@dspinellis
Copy link
Owner

Good point! I assume you're running csmake with a -j flag?

@pelrun
Copy link
Author

pelrun commented Oct 4, 2019

Not directly, but the project is complicated with all sorts of shenanigans and subordinate make's happening under the hood (I didn't write it 😁 )

dspinellis added a commit that referenced this issue Oct 4, 2019
For POSIX-compliant filesystems and modern NFS this should avoid
garbled output from concurrent make executions.

Issue: #47
@dspinellis
Copy link
Owner

Can you please try the version of csmake I just pushed?

dspinellis added a commit that referenced this issue Oct 6, 2019
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

No branches or pull requests

2 participants