Closed Bug 129543 Opened 23 years ago Closed 23 years ago

call system("./processmail", ... is not working under windows

Categories

(Bugzilla :: Bugzilla-General, defect, P3)

2.15
x86
Windows 2000
defect

Tracking

()

RESOLVED DUPLICATE of bug 136156

People

(Reporter: cedric.caron, Assigned: justdave)

Details

Attachments

(2 files)

Under windows starting procmail with system("./processmail", ... is not working The first reason is the / windows is using \ as path separator The second is the name of the function, windows is not interpreting processmail as a valid command to execute. my solution is to remplace the / by a pathseparator variable set in localconfig and create a processmail.bat to call "perl ./processmail"
This patch add a $pathseparator variable in global.ph and use this variable when calling the system to construct a corect path "./processmail" under unix or ".\processmail" under windows
Attached patch processmail.batSplinter Review
processmail.bat is needed to make system(./processmail... working Under windows processmail is not a valid command. an other solution to this problem is to rename processmail to processmail.pl
I think we should just nuke the system call and instead use direct linkage.
You have the same problem with all the other system call, not just when call processmail. You need to use the corect path separator.
Or just not use system() calls. See bug 84876 and bug 124174.
My patch only corect the call to processmail but you have the same problem each time you "manualy" construct a path. Under unnix the path separator is / under windows \ and if you need to make your soft on a mac with mac os 9 the separator is :.
Priority: -- → P3
Target Milestone: --- → Bugzilla 2.18
Is there any reason to fix this separately anymore since bug 124174 (bbaetz's processmail modularization) has a patch and is probably going to be checked in fairly soon after 2.16 is out?
Thsi problem exist not only when you call procesmail bay for all the call of the system function. My patch only corect the call to processmail but you have the same problem calling syncshadowdb or any user of system with a relativ path.
This bug's summary indicates relevance only to processmail and the patch exists only for processmail, too. As you said, system() calls elsewhere are troublesome as well, but there is a separate bug 136156 for that.
Ok you can close this bug and as soon as I have 5 minuts I will add my patch to all the system call to bug 136156
*** This bug has been marked as a duplicate of 136156 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
clearing target in DUPLICATE/WORKSFORME/INVALID/WONTFIX bugs so they'll show up as untriaged if they get reopened.
Target Milestone: Bugzilla 2.18 → ---
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: