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

Add method to configure system process attributes #74

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NeedsSoySauce
Copy link

@NeedsSoySauce NeedsSoySauce commented Nov 15, 2024

Adds a method to set system process attributes on the process used to run exiftool.

For example, on windows to run exiftool without creating a window:

const CreateNoWindow = 0x08000000
var sysProcAttr = syscall.SysProcAttr{
	HideWindow:    true,
	CreationFlags: CreateNoWindow,
}
et, err := exiftool.NewExiftool(exiftool.SystemProcessAttributes(&sysProcAttr))

I'm not exactly sure what a good way is to test this? An option I considered was replacing exec.Command with a fake so that SysProcAttr can be inspected when the command is actually run. If that sounds okay let me know and I can do it.

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.

1 participant