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

Fix Windows Build Issue by Splitting Taskify into OS-Specific Files #48

Merged
merged 2 commits into from
Oct 27, 2024

Conversation

yeganemehr
Copy link
Contributor

This PR fixes the build issue on Windows caused by a Linux-only syscall in tasker.go.
Windows doesn’t support that syscall, so I adjusted the approach by creating an OS-specific setup for the Taskify function.

Split tasker.go by OS

  • tasker.go: Keeps the core tasker functionality, minus the Taskify function.
  • tasker_windows.go: Adds a Windows-specific Taskify function using CREATE_NEW_PROCESS_GROUP to handle process group creation.
  • tasker_other.go: Retains the original Taskify function for Linux and other Unix-like systems.

This way, the build works perfectly on both Windows and Unix-based OS.

Closes #47

@yeganemehr yeganemehr requested a review from adhocore as a code owner October 26, 2024 16:27
Copy link
Owner

@adhocore adhocore left a comment

Choose a reason for hiding this comment

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

great, thanks 👍

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.36%. Comparing base (28b4284) to head (cb088d4).
Report is 8 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #48      +/-   ##
==========================================
- Coverage   93.40%   93.36%   -0.04%     
==========================================
  Files           9       10       +1     
  Lines         697      693       -4     
==========================================
- Hits          651      647       -4     
  Misses         28       28              
  Partials       18       18              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adhocore adhocore merged commit 8abd859 into adhocore:main Oct 27, 2024
12 checks passed
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.

Windows Build Fails Because Of Using Linux Syscall
3 participants